Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
split(1) OSS Shell and Utilities Reference Manual
If the number of files required is greater than the maximum allowed by the effective suffix length
(such that the last allowable file would be larger than the requested size), split fails after creating
the last possible file with a valid suffix. The split command does not delete the files it creates
with valid suffixes. If the file limit is not exceeded, the last file created contains the remainder of
the input file and thus might be smaller than the requested size.
Environment Variables
This command supports the use of the LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and
NLSPATH environment variables.
Operands
file Specifies the pathname of the file to be read. If you do not specify an input file,
or if you specify - (dash) in place of file, split reads the standard input file.
prefix Specifies the prefix to be used for the resulting output filenames.
EXAMPLES
1. To split a file into 1000-line segments, enter:
split book
This splits book into 1000-line segments named xaa, xab, xac, and so forth.
2. To split a file into 50-line segments and specify the filename prefix, enter:
split -l 50 book sect
This splits book into 50-line segments named sectaa, sectab, sectac, and so forth.
EXIT VALUES
The split command returns the following values:
0 (zero) The command completed successfully.
>0 An error occurred.
RELATED INFORMATION
Commands: join(1).
STANDARDS CONFORMANCE
This command conforms to the XPG4 Version 2 specification with extensions, with the following
exception:
• The length of an output filename cannot be greater than NAME_MAX - 2 bytes.
8−52 Hewlett-Packard Company 527188-003