BSD 4_4 release
[unix-history] / usr / src / usr.bin / split / split.1
index 3aa9d5c..d364be8 100644 (file)
-.\" Copyright (c) 1990 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1990, 1991, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\"
-.\"     @(#)split.1    6.3 (Berkeley) 6/24/90
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.TH SPLIT 1 "%Q"
-.AT 3
-.SH NAME
-split \- split a file into pieces
-.SH SYNOPSIS
-\fBsplit\fP [ -\fBn\fP ] [ -\fBb\fP byte_cnt ] [ file [ name ] ]
-.SH DESCRIPTION
-\fISplit\fP reads \fIfile\fP and writes it in
-.IR n -line
-pieces or in \fIbyte_cnt\fP byte pieces to a set of output
-files.  The default is in 1000 line pieces.  The name of the
-first output file is \fIname\fP with "aa" appended, and so
-on, lexicographically, to "zz".  If no output name is given,
-"x" is the default, in which case \fIsplit\fP will create
-files from "xaa" to "zzz".
-.PP
-If no input file is given, or if \fB-\fP is given in its stead, then
-the standard input file is used.
-.SH BUGS
-If you provide \fIname\fP, \fIsplit\fP can only create 676 separate
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\"    @(#)split.1     8.1 (Berkeley) 6/6/93
+.\"
+.Dd June 6, 1993
+.Dt SPLIT 1
+.Os
+.Sh NAME
+.Nm split
+.Nd split a file into pieces
+.Sh SYNOPSIS
+.Nm split
+.Op Fl Ns Ar n
+.Op Fl b Ar bytes
+.Op Ar file Op Ar name
+.Sh DESCRIPTION
+The
+.Nm split
+utility reads the given
+.Ar file
+and splits it up in to
+smaller files.
+.Pp
+Available options:
+.Bl -tag -width "bb bytesx"
+.It Fl Ns Ar lines
+Create files of length
+.Fl Ns Ar n
+lines long.
+.It Fl b Ar bytes
+Create files of length
+.Ar bytes .
+If no output file length is specified, the file size
+will default to a lenght of 1000 lines.
+.El
+.Pp
+Available operands:
+.Bl -tag -width name
+.It Fl
+Read from the standard input.
+.It Ar file
+A pathname specifying the
+.Ar file 
+to be split.  If no
+.Ar file
+operand is given,
+.Nm split
+reads from the standard input.
+.It Ar name
+If the
+.Ar name
+operand is given,
+the output files will begin with the prefix
+.Ar name
+and each sequential portion of the split file
+receives a lexically ordered suffix
+in the range of 
+.Bq Em aa-zz .
+If the operand
+.Ar name
+is not specified,
+the default prefix of
+.Em x
+is be used.
+.Pp
+.Sh BUGS
+If you provide
+.Ar name ,
+.Nm split
+can only create 676 separate
 files.  The default naming convention allows 2028 separate files.
 files.  The default naming convention allows 2028 separate files.
+.Sh HISTORY
+A
+.Nm split
+command appeared in
+.At v6 .