From acd70ef916b4799f20f5df3d2c18a328da9fa328 Mon Sep 17 00:00:00 2001 From: ru Date: Thu, 30 May 2002 13:48:06 +0000 Subject: mdoc(7) police: markup polishing. --- usr.bin/csplit/csplit.1 | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'usr.bin/csplit') 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 -- cgit v1.1