1
0
Files
irix-657m-src/eoe/man/man1/split.1
2022-09-29 17:59:04 +03:00

87 lines
3.2 KiB
Groff

'\"macro stdmacro
.if n .pH g1.split @(#)split 41.7 of 5/26/91
.\" Copyright 1991 UNIX System Laboratories, Inc.
.\" Copyright 1989, 1990 AT&T
.nr X
.if \nX=0 .ds x} split 1 "Directory and File Management Utilities" "\&"
.if \nX=1 .ds x} split 1 "Directory and File Management Utilities"
.if \nX=2 .ds x} split 1 "" "\&"
.if \nX=3 .ds x} split "" "" "\&"
.TH \*(x}
.SH NAME
\f4split\f1 \- split a file into pieces
.SH SYNOPSIS
\f4split\f1 [\f4\-l\f2line_count\f1] [\f4\-a\f2suffix_length\f1]
[\f2file\f1 [\f2name\f1]]
.br
\f4split\f1 \f4\-b\f2n\f1[k|m] [\f4\-a\f2suffix_length\f1]
[\f2file\f1 [\f2name\f1]]
.br
\f4split\f1
[
\f4\-\f2line_count\f1
]
[ \f2file\f1 [ \f2name\f1 ] ]
.SH DESCRIPTION
\f4split\fP
reads an input
.I file
and writes
it in one or more output files. The default size of each
output file is 1000 lines. The size of the output files can
be modified by \f4\-b\f1 and \f4\-l\f1 options. Each
output file is created with a unique suffix. The suffix
consists of exactly \f2suffix_length\f1 lower-case letters from
locale. The letters of the suffix are used as if they were
a base-26 digit system, with the first suffix to be created
consisting of all a characters, the second with a b replacing
the last a, and so sorth, until a name of all z characters is
created. By default, The names of the output files are x,
followed by a two-character suffix from the character set as
described above, starting with aa, ab, ac, and so forth, and
continuing until the suffix zz, for a maximum of 676 files.
.PP
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, \f4split\f1
will fail after creating the last file with a valid suffix;
it will not delete the files it created with valid suffixes.
If the file limit is not exceeded, the last file created will
contain the remainder of the input file, and may be smaller than
the requested size.
.PP
\f2file\f1 is the pathname of the file to be split. If no file
is given or \f2file\f1 is \f4\-\f1, the standard input will be
used. \f2name\f1 is the prefix to be used for each of the files
resulting from the split operation. If not given, x will be used
as the prefix of the output files.
.SH OPTIONS
.TP
\f4\-a\f2suffix_length\f1
Use \f2suffix_length\f1 letters to form the suffix portion of the
filenames of the split file. Default suffix length is 2. If
the sum of \f2name\f1 and \f2suffix_length\f1 option-argument
would create a filename exceeding NAME_MAX bytes, \f4split\f1
will exit with a diagnostic message and no files will be
created.
.TP
\f4\-b\f2n\f1[k|m}
Specify the output file size in bytes \f2n\f1. With k specified, an output
file is n*1024 bytes in size;with m specified, a file is n*1048576
bytes in size.
.TP
\f4\-l\f2line_count\f1 or \f4\-\f2line_count\f1
Specify the number of lines in each output file. \f2line_count\f1
is an unsigned decimal integer. The default is 1000. If the input
does not end with a newline character, the partial line will be
included in the last ouput file.
.SH FILES
.TP
\f4/usr/lib/locale/\f2locale\f4/LC_MESSAGES/uxdfm\f1
language-specific message file (see \f4LANG\fP on \f4environ\f1(5)
.SH SEE ALSO
\f4bfs\fP(1), \f4csplit\fP(1),
\f4statvfs\fP(2)
.\" @(#)split.1 6.2 of 9/2/83
.Ee