AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox

01.01.2013 Views

i�

CSPLIT ( 1) CSPLIT (l) NAME csplit - context split SYNOPSIS c8plit [-8] [-k] [-f prefix] file argl [ • • • argn] DESCRIPTION Csplit reads file and separates it into n+l sections, defined by the arguments argl . • • argn . By default the sections are placed in xxOO • • • xxn (n may not be greater than 99). These sections get the following pieces of file : 00: From the start of file up to (but not including) the line referenced by argl . 01: From the line referenced by argl up to the line referenced by arg2. n+l: From the line referenced by argn to the end of file . The options to csplit are: -8 Csplit normally prints the character counts for each file created. If the -8 option is present, csplit suppresses the printing of all character counts. -k Csplit normally removes created files if an error occurs. If the -k option is present, csplit leaves previously created files intact. -f prefix If the -f option is used, the created files are named prefixOO • • • prefixn . The default is xxOO • • • xxn. The arguments ( argl • • • argn) to csplit can be a combination of the following: I rexp I A file is to be created for the section from the current line up to (but not including) the line containing the regular expression rexp . The current line becomes the line containing rexp . This argument may be followed by an optional + or - some number of lines (e.g., IPagel-5). %rexp% This argument is the same as lrexp I, except that no file is created for the section. lnno A file is to be created from the current line up to (but not including) lnno. The current line becomes lnno. { num} Repeat argument. This argument may follow any of the above arguments. If it follows a rexp type argument, that argument is applied num more times. If it follows lnno, the file will be split every lnno lines (num times) from that point. Enclose all rexp type arguments that contain blanks or other characters meaningful to the Shell in the appropriate quotes. - 1 -

i�

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!