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