Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)

split(1) OSS Shell and Utilities Reference Manual
If the number of les required is greater than the maximum allowed by the effective sufx length
(such that the last allowable le would be larger than the requested size), split fails after creating
the last possible le with a valid sufx. The split command does not delete the les it creates
with valid sufxes. If the le limit is not exceeded, the last le created contains the remainder of
the input le 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 Species the pathname of the le to be read. If you do not specify an input le,
or if you specify - (dash) in place of le, split reads the standard input le.
prefix Species the prex to be used for the resulting output lenames.
EXAMPLES
1. To split a le 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 le into 50-line segments and specify the lename prex, 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 specication with extensions, with the following
exception:
The length of an output lename cannot be greater than NAME_MAX - 2 bytes.
852 Hewlett-Packard Company 527188-003