Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.unix.questions Subject: Re: splitting a big file with _no_ newlines in it Keywords: no new lines Message-ID: <8577@jpl-devvax.JPL.NASA.GOV> Date: 3 Jul 90 00:08:33 GMT References: <62@ai.etl.army.mil> <1990Jul2.202413.9361@athena.mit.edu> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Distribution: usa Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 25 In article <1990Jul2.202413.9361@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes: : 4.3BSD-tahoe's (and, presumably, 4.4BSD's) version of split solves : this problem by assuming ASCII (i.e. line-by-line) splitting in all : cases, unless the user specifically instructs it to split by characters, : rather than by lines. : : You can get this version of split from uunet.uu.net via anonymous ftp : in the directory bsd-sources/src/usr.bin in the fiel split.c.Z. : Unfortunately, I don't see a man page for it anywhere in the bsd-sources : directory, so if you can't figure out how it works from reading the : sources (it's pretty obvious), let me know in E-mail and I'll mail you : the man page. Or, if you have perl handy, just say #!/usr/bin/perl $out = "xaa"; while (read(STDIN,$foo,32768)) { open(OUT, '>' . $out++); print OUT $foo; } Season to taste. Larry Wall lwall@jpl-devvax.jpl.nasa.gov