HP-UX Reference (11i v2 04/09) - 1 User Commands N-Z (vol 2)

s
split(1) split(1)
NAME
split - split a file into pieces
SYNOPSIS
split [-l line_count ][-a suffix_length ][file [ name ]]
split [-b n[km
]] [-a suffix_length ][file [ name ]]
Obsolescent
split [-n ][file [ name ]]
DESCRIPTION
split reads file and writes it in pieces (default 1000 lines) onto a set of output files. The name of the
first output file is name with
aa appended, and so on lexicographically, up to
zz (only ASCII letters are
used, a maximum of 676 files). If no output name is given,
x is the default.
If no input file is given, or if
- is given instead, the standard input file is used.
Options
split recognizes the following command-line options and arguments:
-l line_count The input file is split into pieces line_count lines in size.
-a suffix_length
suffix_length letters are used to form the suffix of the output filenames. This option
allows creation of more than 676 output files. The output file names created cannot
exceed the maximum file name length allowed in the directory containing the files.
-b n The input file is split into pieces n bytes in size.
-b nk The input file is split into pieces n × 1024 bytes in size. No space separates the n
from the
k.
-b nm The input file is split into pieces n × 1 048 576 bytes in size. No space separates the
n from the m.
-n The input file is split into pieces n lines in size. This option is obsolescent and is
equivalent to using the -l line_count option.
EXTERNAL INFLUENCES
Environment Variables
LC_CTYPE determines the locale for the interpretation of text as single- and/or multi-byte characters.
LC_MESSAGES determines the language in which messages are displayed.
If
LC_CTYPE or LC_MESSAGES is not specified in the environment or is set to the empty string, the
value of LANG is used as a default for each unspecified or empty variable. If
LANG is not specified or is
set to the empty string, a default of "C" (see lang(5)) is used instead of
LANG.
If any internationalization variable contains an invalid setting,
split behaves as if all internationaliza-
tion variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
SEE ALSO
csplit(1).
STANDARDS CONFORMANCE
split: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
HP-UX 11i Version 2: September 2004 1 Hewlett-Packard Company Section 1889