MPE/iX Shell and Utilities Reference Manual, Vol 2
split(1) MPE/iX Shell and Utilities split(1)
NAME
split — split a file into manageable pieces
SYNOPSIS
split [–a n][–l n][file [prefix]]
split –b n[bkm][–a n][file [prefix]]
split [–n][–a n] file [prefix]
DESCRIPTION
split breaks a file up into a set of files. By default, split starts a new file every time it has
copied 1000 lines.
split names the files that it creates as a prefix followed by a suffix. x is the prefix unless
you specify a different prefix on the command line. Unless altered by options, the suffix be-
gins as aa and is incremented with each new file. By default, therefore, the first file is xaa
followed by xab, and so on.
Options
split accepts the following options:
–a n uses a suffix n letters long. The default is two.
–b n[bkm]
splits the file every n units. The default unit size is bytes. When you follow n with b,
k,orm, split uses a corresponding unit size of 512 bytes, 1K (1024 bytes), or 1
megabyte (1,048,576 bytes).
–l n splits the file every n lines.
–n is an obsolescent version of the –l option.
If the file is – (dash) or no file is specified, split reads the standard input.
DIAGNOSTICS
Possible exit status values are:
0 Successful completion.
1 An error occurred.
Messages
Message: Generated filenames would be too long
Cause: You specified a prefix and an argument to the –a option (length of suffix) that
would result in file names longer than the maximum allowed by the configura-
tion variable NAME_MAX.
Action: Specify a shorter prefix or a shorter suffix.
Commands and Utilities 1-567