Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ark1!ai.etl.army.mil!anneb From: anneb@ai.etl.army.mil (Anne Brink) Newsgroups: comp.unix.questions Subject: splitting huge \n-less files (a summary) Keywords: compress, dd, split (new), perl, nroff, tr Message-ID: <64@ai.etl.army.mil> Date: 3 Jul 90 17:23:19 GMT Distribution: usa Organization: USAETL, Fort Belvoir, Virginia Lines: 37 Yesterday, I asked for insight into splitting a long file up that split refused to handle. Thanks to everyone who replied. Solutions included: 1) get a new version of split (found on uunet in bsd-sources/src/usr.bin/ (info courtesy Jonathan Kamens at MIT, posted yesterday) 2) use a perl script: #!/usr/bin/perl $out = "xaa"; while (read(STDIN,$foo,32768)) { open(OUT, '>' . $out++); print OUT $foo; } (script courtesy Larry Wall, also posted yesterday) 3) several people suggested using dd with the skip= and count= options 4) Do something with compress and pipe through a filter that will put in newlines 4) nroff the file (from Michael Kosmin) 5) judicious use of tr changing a recurrent character into a \n (also from several people) Once again, thanks! Now, to work chopping up files...... -Anne anneb@etl.army.mil -- #################################||############################################ Anne Brink: anneb@etl.army.mil ||U.S.Army Engineer Topographic Labs ...!uunet!etl.army.mil!anneb ||Ft. Belvoir, VA 22060-5546 #################################||############################################