split
pubs.opengroup.org →If the number of files required exceeds the maximum allowed by the suffix length provided, such that the last allowable file would be larger than the requested size, the split utility shall fail after creating the last file with a valid suffix; split shall not delete the files it created with valid suffixes. If the file limit is not exceeded, the last file created shall contain the remainder of the input file, and may be smaller than the requested size. If the input is an empty file, no output file shall be created and this shall not be considered to be an error. Use suffix length letters to form the suffix portion of the filenames of the split file. If -a is not specified, the default suffix length shall be two. If the sum of the name operand and the suffix length option-argument would create a filename exceeding {NAME MAX} bytes, an error shall result; split shall exit with a diagnostic message and no files shall be created. Specify the number of lines in each resulting file piece. The line count argument is an unsigned decimal integer. The default is 1000. If the input does not end with a , the partial line shall be included in the last output file. The prefix to be used for each of the files resulting from the split operation. If no name argument is given, 'x' shall be used as the prefix of the output files. The combined length of the basename of prefix and suffix length cannot exceed {NAME MAX} bytes. See the OPTIONS section. Provide a default value for the internationalization variables that are unset or null. (See XBD Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and input files). Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. [XSI) ] ![[Option Start]]( Determine the location of message catalogs for the processing of LC MESSAGES. ![[Option End]]( The output files contain portions of the original input file; otherwise, unchanged. In the following examples foo is a text file that contains 5000 lines. 3. Create three files with four-letter suffixes and a supplied prefix, bar aaaa , bar aaab , and bar aaac : The -b option was added to provide a mechanism for splitting files other than by lines. While most uses of the -b option are for transmitting files over networks, some believed it would have additional uses. The -a option was added to overcome the limitation of being able to create only 676 files. Consideration was given to deleting this utility, using the rationale that the functionality provided by this utility is available via the csplit utility (see csplit ). Upon reconsideration of the purpose of the User Portability Utilities option, it was decided to retain both this utility and the csplit utility because users use both utilities and have historical expectations of their behavior. Furthermore, the splitting on byte boundaries in split cannot be duplicated with the historical csplit . The text " split shall not delete the files it created with valid suffixes" would normally be assumed, but since the related utility, csplit , does delete files under some circumstances, the historical behavior of split is made explicit to avoid misinterpretation. This utility is marked as part of the User Portability Utilities option. The split utility is moved from the User Portability Utilities option to the Base. User Portability Utilities is now an option for interactive utilities.
Excerpt from a page describing this subject · 10,247 chars · not written by Vinony
via Wikidata · CC0
via Wikidata sitelinks · CC0
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).