csplit

From Wikipedia, the free encyclopedia

Template:Short description

Page Module:Infobox/styles.css has no content.

csplit
Template:Infobox software/simple
EnginePage Template:Plainlist/styles.css has no content.Template:EditAtWikidata
Operating systemUnix and Unix-like
PlatformCross-platform
TypeCommand
LicenseGNU GPL v3
WebsiteScript error: No such module "WikidataIB".
RepositoryPage Template:Plainlist/styles.css has no content.

Script error: No such module "Check for conflicting parameters".

csplit is a shell command for splitting a file into two or more smaller files determined by context lines. The command is commonly available on Unix and Unix-like operating systems.

The command is part of the X/Open Portability Guide since issue 2 of 1987. It was inherited into the first version of POSIX and the Single Unix Specification.[1] It first appeared in PWB UNIX.[2] The version in GNU coreutils was written by Stuart Kemp and David MacKenzie.[3] The command is available for Windows via UnxUtils.[4]

Usage

The command line arguments consist of options, a file path and a list of patterns.

Each patterns is a line number or regular expression. 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.

Comparison to split

The split command also splits a file into pieces, although the pieces are of a fixed size, measured in lines or bytes.

See also

References

Page Template:Reflist/styles.css has no content.

  1. ^ Template:Man
  2. ^ Template:Man
  3. ^ Page Module:Citation/CS1/styles.css has no content."Csplit(1) - Linux man page". Archived from the original on 2019-07-31. Retrieved 2019-01-26.
  4. ^ Page Module:Citation/CS1/styles.css has no content."Native Win32 ports of some GNU utilities". unxutils.sourceforge.net. Archived from the original on 2006-02-09. Retrieved 2025-08-09.

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. Template:ISBN.

Page Module:Side box/styles.css has no content.Page Template:Sister project/styles.css has no content.

Lua error in package.lua at line 80: module 'Module:Navbox/configuration' not found. Template:Core Utilities commands