请输入您要查询的百科知识:

 

词条 Csplit
释义

  1. History

  2. Usage

  3. Comparison to split

  4. See also

  5. References

  6. Further reading

  7. External links

{{lowercase}}{{Infobox Software
| name = csplit
| logo =
| screenshot =
| screenshot size =
| caption =
| author =
| developer =
| released =
| latest release version =
| latest release date =
| operating system = Unix and Unix-like
| genre = Command
| license = GNU GPL v3
| website =
}}

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.

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).

See also

  • List of Unix commands
  • split (Unix)

References

1. ^https://linux.die.net/man/1/csplit

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}}.

External links

  • {{man|cu|csplit|SUS|split files based on context}}
{{Unix commands}}

2 : Standard Unix programs|Unix SUS2008 utilities

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/13 9:38:37