version 1.5, 1999/06/05 01:21:40 |
version 1.6, 2000/01/05 07:40:43 |
|
|
returns 0. |
returns 0. |
.Nm sort |
.Nm sort |
.Fl c |
.Fl c |
produces no output. |
produces no output, except the error messages on |
|
.Em stderr . |
.It Fl m |
.It Fl m |
Merge only; the input files are assumed to be pre-sorted. |
Merge only; the input files are assumed to be pre-sorted. |
.It Fl o Ar output |
.It Fl o Ar output |
|
|
is used as the field separator character. The initial |
is used as the field separator character. The initial |
.Ar char |
.Ar char |
is not considered to be part of a field when determining |
is not considered to be part of a field when determining |
key offsets (see below). |
key offsets. |
Each occurrence of |
Each occurrence of |
.Ar char |
.Ar char |
is significant (for example, |
is significant (for example, |
|
|
delimits an empty field). |
delimits an empty field). |
If |
If |
.Fl t |
.Fl t |
is not specified, |
is not specified, the default field separator is a sequence of |
blank space characters are used as default field |
blank-space characters, and consecutive blank spaces do |
separators. |
.Em not |
|
delimit an empty field; further, the initial blank space |
|
.Em is |
|
considered part of a field when determining key offsets. |
.It Fl R Ar char |
.It Fl R Ar char |
.Ar char |
.Ar char |
is used as the record separator character. |
is used as the record separator character. |
|
|
.El |
.El |
.Pp |
.Pp |
A field is |
A field is |
defined as a minimal sequence of characters followed by a |
defined as a maximal sequence of characters other than the |
field separator or a newline character. |
field separator and record separator |
By default, the first |
.Pq newline by default . |
blank space of a sequence of blank spaces acts as the field separator. |
Initial blank spaces are included in the field unless |
All blank spaces in a sequence of blank spaces are considered |
.Fl b |
as part of the next field; for example, all blank spaces at |
has been specified; |
the beginning of a line are considered to be part of the |
the first blank space of a sequence of blank spaces acts as the field |
first field. |
separator and is included in the field (unless |
|
.Fl t |
|
is specified). |
|
For example, by default all blank spaces at the beginning of a line are |
|
considered to be part of the first field. |
.Pp |
.Pp |
Fields are specified |
Fields are specified |
by the |
by the |
|
|
.Ar field2 |
.Ar field2 |
have the form |
have the form |
.Em m.n |
.Em m.n |
followed by one or more of the options |
.Em (m,n > 0) |
.Fl b , d , f , i , |
and can be followed by one or more of the letters |
.Fl n , r . |
.Cm b , d , f , i , |
|
.Cm n , |
|
and |
|
.Cm r , |
|
which correspond to the options discussed above. |
A |
A |
.Ar field1 |
.Ar field1 |
position specified by |
position specified by |
.Em m.n |
.Em m.n |
.Em (m,n > 0) |
|
is interpreted as the |
is interpreted as the |
.Em n Ns th |
.Em n Ns th |
character in the |
character from the beginning of the |
.Em m Ns th |
.Em m Ns th |
field. |
field. |
A missing |
A missing |
|
|
non-blank character in the |
non-blank character in the |
.Em m Ns th |
.Em m Ns th |
field. |
field. |
|
.No 1\&. Ns Em n |
|
refers to the |
|
.Em n Ns th |
|
character from the beginning of the line; |
|
if |
|
.Em n |
|
is greater than the length of the line, the field is taken to be empty. |
.Pp |
.Pp |
A |
A |
.Ar field2 |
.Ar field2 |