summaryrefslogtreecommitdiffstats
path: root/usr.bin/csplit
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-05-30 13:48:06 +0000
committerru <ru@FreeBSD.org>2002-05-30 13:48:06 +0000
commitacd70ef916b4799f20f5df3d2c18a328da9fa328 (patch)
tree1eb439cc3cedcf9da0c35ded46c51eefd61eb280 /usr.bin/csplit
parentcd4e93f6df58167d7088384ac464cd8c6e201b76 (diff)
downloadFreeBSD-src-acd70ef916b4799f20f5df3d2c18a328da9fa328.zip
FreeBSD-src-acd70ef916b4799f20f5df3d2c18a328da9fa328.tar.gz
mdoc(7) police: markup polishing.
Diffstat (limited to 'usr.bin/csplit')
-rw-r--r--usr.bin/csplit/csplit.138
1 files changed, 22 insertions, 16 deletions
diff --git a/usr.bin/csplit/csplit.1 b/usr.bin/csplit/csplit.1
index cd4645a..61526ea 100644
--- a/usr.bin/csplit/csplit.1
+++ b/usr.bin/csplit/csplit.1
@@ -35,22 +35,19 @@
.Op Fl ks
.Op Fl f Ar prefix
.Op Fl n Ar number
-.Ar file
-.Bk
-.Ar args ...
-.Ek
+.Ar file args ...
.Sh DESCRIPTION
The
.Nm
utility splits
.Ar file
into pieces using the patterns
-.Ar args... .
+.Ar args .
If
.Ar file
is
a dash
-.Pq Ql \&- ,
+.Pq Sq Fl ,
.Nm
reads from standard input.
.Pp
@@ -60,7 +57,7 @@ The options are as follows:
Give created files names beginning with
.Ar prefix .
The default is
-.Sq Pa xx .
+.Dq Pa xx .
.It Fl k
Do not remove output files if an error occurs or a
.Dv HUP ,
@@ -73,23 +70,32 @@ Use
.Ar number
of decimal digits after the
.Ar prefix
-to form the file name. The default is 2.
+to form the file name.
+The default is 2.
.It Fl s
Do not write the size of each output file to standard output as it is
created.
.El
.Pp
The
-.Ar args...
+.Ar args
operands may be a combination of the following patterns:
-.Bl -tag -width "line_no"
-.It Cm / Ns Ar regexp Ns Cm / Ns Oo Oo +|- Oc Ns Ar offset Oc
+.Bl -tag -width indent
+.It Xo
+.Sm off
+.Cm / Ar regexp Cm / Op Oo Cm + | - Oc Ar offset
+.Sm on
+.Xc
Create a file containing the input from the current line to (but not including)
the next line matching the given basic regular expression.
An optional
.Ar offset
from the line that matched may be specified.
-.It Cm % Ns Ar regexp Ns Cm % Ns Oo Oo +|- Oc Ns Ar offset Oc
+.It Xo
+.Sm off
+.Cm % Ar regexp Cm % Op Oo Cm + | - Oc Ar offset
+.Sm on
+.Xc
Same as above but a file is not created for the output.
.It Ar line_no
Create containing the input from the current line to (but not including)
@@ -97,9 +103,9 @@ the specified line number.
.It Cm { Ns Ar num Ns Cm }
Repeat the previous pattern the specified number of times.
If it follows a line number pattern, a new file will be created for each
-.Em line_no
+.Ar line_no
lines,
-.Em num
+.Ar num
times.
The first line of the file is line number 1 for historic reasons.
.El
@@ -116,11 +122,11 @@ file
.Pa foo.1
into one file for each section (up to 20):
.Pp
-.D1 Ic csplit -k foo.1 '%^\e.Sh%' '/^\e.Sh/' '{20}'
+.Dl "csplit -k foo.1 '%^\e.Sh%' '/^\e.Sh/' '{20}'"
.Pp
Split standard input after the first 99 lines and every 100 lines thereafter:
.Pp
-.D1 Ic csplit -k - 100 '{19}'
+.Dl "csplit -k - 100 '{19}'"
.Sh DIAGNOSTICS
.Ex -std
.Sh SEE ALSO
OpenPOWER on IntegriCloud