1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
.TH SPLIT 1
.CT 1 files
.SH NAME
split \- split a file into pieces
.SH SYNOPSIS
.B split
[
.I option ...
]
[
.I file
]
.SH DESCRIPTION
.I Split
reads
.I file
(standard input by default)
and writes it in pieces of 1000
lines per output file.
The names of the
output files are
.BR xaa ,
.BR xab ,
and so on to
.BR xzz .
The options are
.TP
.BI -n " n"
Split into
.IR n -line
pieces.
.TP
.BI -l " n"
Synonym for
.B -n
.IR n ,
a nod to Unix's syntax.
.TP
.BI -e " expression"
File divisions occur at each line
that matches a regular
.IR expression ;
see
.IR regexp (7).
Multiple
.B -e
options may appear.
If a subexpression of
.I expression
is contained in parentheses
.BR ( ... ) ,
the output file name is the portion of the
line which matches the subexpression.
.TP
.BI -f " stem
Use
.I stem
instead of
.B x
in output file names.
.TP
.BI -s " suffix
Append
.I suffix
to names identified under
.BR -e .
.TP
.B -x
Exclude the matched input line from the output file.
.TP
.B -i
Ignore case in option
.BR -e ;
force output file names (excluding the suffix)
to lower case.
.SH SOURCE
.B \*9/src/cmd/split.c
.SH SEE ALSO
.IR sed (1),
.IR awk (1),
.IR grep (1),
.IR regexp (7)
|