csplit

The csplit command in Unix and Unix-like operating systems is a utility that is used to split a file into two or more smaller files determined by context lines.

csplit
Operating systemUnix and Unix-like
TypeCommand
LicenseGNU GPL v3

History

The version of csplit bundled in GNU coreutils was written by Stuart Kemp and David MacKenzie.[1]

Usage

The command-syntax is:

csplit [OPTION]... FILE PATTERN...

The patterns may be line numbers or regular expressions. The program outputs pieces of the file separated by the patterns into files xx00, xx01, etc., and outputs the size of each piece, in bytes, to standard output.

The optional parameters modify the behaviour of the program in various ways. For example, the default prefix string (xx) and number of digits (2) in the output filenames can be changed.

As with most Unix utilities, a return code of 0 indicates success, while nonzero values indicate failure.

Comparison to split

The split command also splits a file into pieces, except that all the pieces are of a fixed size (measured in lines or bytes).

gollark: ARM is an instruction set. "Traditional CPU[s]" use the x86 instruction set. People argue a lot over which design is best but broadly speaking there doesn't seem to be *that* much difference, although x86 has some advantages like I think greater code density and downsides like variable length instructions being annoying to decode.
gollark: That's not a very valid comparison. But Apple's cores are somewhat better than available x86 ones.
gollark: Apparently they did lose most of their CPU design team to some other company recently, so who knows.
gollark: It's really annoying to me that you can only get the best CPUs with Apple's ridiculous ecosystem and design.
gollark: Anyway, it's a shame the PyTorch Vulkan support doesn't seem to actually be... used for anything.

See also

References

Further reading

  • Ellen Siever, Aaron Weber, Stephen Figgins, Robert Love, Arnold Robbins, et al. Linux in a Nutshell, 5th Edition. O'Reilly Media: July 2005. ISBN 978-0-596-00930-4.
  • csplit: split files based on context  Commands & Utilities Reference, The Single UNIX Specification, Issue 7 from The Open Group
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.