16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

csplit<br />

Options<br />

–A Uses uppercase letters in place of numbers in the number portion of<br />

created filenames. This generates names of the form xxAA, xxAB, and so on.<br />

–a Uses lowercase letters in place of numbers in the number portion of created<br />

filenames. This generates names of the form xxaa, xxab, and so on.<br />

–f prefix<br />

Specifies a prefix to use in place of the default xx when naming files. If it<br />

causes a filename longer than NAME_MAX bytes, an error occurs and csplit<br />

exits without creating any files.<br />

–k Leaves all created files intact. Normally, when an error occurs, csplit<br />

removes files that it has created.<br />

–n number<br />

Specifies the number of digits in the number portion of created filenames.<br />

–s Suppresses the display of file sizes.<br />

Splitting Criteria<br />

csplit processes the args on the command line sequentially. The first argument<br />

breaks off the first chunk of the file, the second argument breaks off the next chunk<br />

(beginning at the first line remaining in the file), and so on. Thus each chunk of the<br />

file begins with the first line remaining in the file and goes to the line given by the<br />

next arg.<br />

arg values can take any of the following forms:<br />

/regexp/<br />

Takes the chunk as all the lines from the current line up to but not including<br />

the next line that contains a string matching the regular expression regexp.<br />

After csplit obtains the chunk and writes it to an output file, it sets the<br />

current line to the line that matched regexp.<br />

/regexp/offset<br />

Is the same as the previous criterion, except that the chunk goes up to but<br />

not including the line that is a given offset from the first line containing a<br />

string that matches regexp. The offset can be a positive or negative integer.<br />

After csplit has obtained the chunk and written it to an output file, it sets<br />

the current line to the line that matched regexp.<br />

Note: This current line is the first one that was not part of the chunk just<br />

written out.<br />

%regexp%<br />

Is the same as /regexp/, except that csplit does not write the chunk to an<br />

output file. It simply skips over the chunk.<br />

%regexp%offset<br />

Is the same as /regexp/offset, except csplit does not write the chunk to an<br />

output file.<br />

linenumber<br />

Obtains a chunk beginning at the current line and going up to but not<br />

including the linenumberth line. After split writes the chunk to an output file,<br />

it sets the current line to linenumber.<br />

{number}<br />

Repeats the previous criterion number times. If it follows a regular<br />

174 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

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

Saved successfully!

Ooh no, something went wrong!