split-splits a file into pieces

 <  Day Day Up  >  

split ” splits a file into pieces

 split [ n ] [ filename [ name ] ] 

split reads filename and writes it in n line pieces into a set of output files. The first output file is named with aa appended, and so on lexicographically, up to zz (a maximum of 676 files). The maximum length of name is 2 characters less than the maximum filename length allowed by the filesystem. See statvfs . If no output name is given, x is used as the default. (Output files will be called xaa , xab , etc.)

Example A.52.
 1   split -500 filea 2   split -1000 fileb out 

EXPLANATION

  1. Splits filea into 500-line files. Files are named xaa, xab, xac, and so on.

  2. Splits fileb into 1,000-line files named out.aa, out.ab, and so on.

 <  Day Day Up  >  


UNIX Shells by Example
UNIX Shells by Example (4th Edition)
ISBN: 013147572X
EAN: 2147483647
Year: 2004
Pages: 454
Authors: Ellie Quigley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net