Name
csplit
Synopsis
csplit [options
]file
arguments
Separate file into context-based sections and place sections in files named xx00 through xxn (n < 100), breaking file at each pattern specified in arguments. See also split.
Options
- -
Read from standard input.
- -b suffix, --suffix-format= suffix
Append suffix to output filename. This option causes -n to be ignored. suffix must specify how to convert the binary integer to readable form by including one of the following: %d, %i, %u, %o, %x, or %X. The value of suffix determines the format for numbers as follows:
- %d
Signed decimal.
- %i
Same as %d.
- %u
Unsigned decimal.
- %o
Octal.
- %x
Hexadecimal.
- %X
Same as %x.
- -f prefix, --prefix= prefix
Name new files prefix00 through prefixn (default is xx00 through xxn).
- -k, --keep-files
Keep newly created files even when an error occurs (which would normally remove these files). This is useful when you need to specify an arbitrarily large repeat argument, { n }, and you don’t want an out-of-range error to cause removal of the new files.
- -n num, --digits= num
Use output filenames with numbers num digits long. The default is 2.
- -s, -q, --silent, --quiet
Suppress all character counts.
- -z, --elide-empty-files
Do not create empty output files. However, number as if those files had been created.
Arguments
Any one or a combination of the following expressions may be specified as arguments. Arguments containing blanks or other special characters should be surrounded by single quotes.
- / expr /[offset]
Create file ...
Get Linux in a Nutshell, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.