add -s/-S to synopsis
remove TMPDIR stuff - it no longer applies, at least for now move the note about link/unlink from BUGS to NOTES add note about trailing record separator and lack of restriction on line length or allowed bytes
This commit is contained in:
parent
7701dc57be
commit
20db24e8e3
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: sort.1,v 1.7 2001/01/08 18:00:31 jdolecek Exp $
|
.\" $NetBSD: sort.1,v 1.8 2001/01/13 10:47:29 jdolecek Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1991, 1993
|
.\" Copyright (c) 1991, 1993
|
||||||
.\" The Regents of the University of California. All rights reserved.
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
.Nd sort or merge text files
|
.Nd sort or merge text files
|
||||||
.Sh SYNOPSIS
|
.Sh SYNOPSIS
|
||||||
.Nm sort
|
.Nm sort
|
||||||
.Op Fl cmubdfinr
|
.Op Fl cmubdfinrsS
|
||||||
.Op Fl t Ar char
|
.Op Fl t Ar char
|
||||||
.Op Fl T Ar char
|
.Op Fl T Ar char
|
||||||
.Oo
|
.Oo
|
||||||
|
@ -139,9 +139,9 @@ Reverse the sense of comparisons.
|
||||||
Don't use stable sort. Default is to use stable sort.
|
Don't use stable sort. Default is to use stable sort.
|
||||||
.It Fl s
|
.It Fl s
|
||||||
Use stable sort. This is the default.
|
Use stable sort. This is the default.
|
||||||
Provided for compatiblity with GNU
|
Provided for compatiblity with other
|
||||||
.Nm
|
.Nm
|
||||||
only.
|
implementations only.
|
||||||
.It Fl H
|
.It Fl H
|
||||||
Use a merge sort instead of a radix sort. This option should be
|
Use a merge sort instead of a radix sort. This option should be
|
||||||
used for files larger than 60Mb.
|
used for files larger than 60Mb.
|
||||||
|
@ -334,28 +334,6 @@ option is still supported, except for
|
||||||
which has no
|
which has no
|
||||||
.Fl k
|
.Fl k
|
||||||
equivalent.
|
equivalent.
|
||||||
.Sh ENVIRONMENT
|
|
||||||
If the following environment variable exists, it is utilized by
|
|
||||||
.Nm "" .
|
|
||||||
.Bl -tag -width Ev
|
|
||||||
.It Ev TMPDIR
|
|
||||||
.Nm
|
|
||||||
uses the contents of the
|
|
||||||
.Ev TMPDIR
|
|
||||||
environment variable as the path in which to store
|
|
||||||
temporary files.
|
|
||||||
.El
|
|
||||||
.Sh FILES
|
|
||||||
.Bl -tag -width Pa -compact
|
|
||||||
.It Pa /var/tmp/sort.*
|
|
||||||
Default temporary directories.
|
|
||||||
.It Pa Ar output Ns #PID
|
|
||||||
Temporary name for
|
|
||||||
.Ar output
|
|
||||||
if
|
|
||||||
.Ar output
|
|
||||||
already exists.
|
|
||||||
.El
|
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr comm 1 ,
|
.Xr comm 1 ,
|
||||||
.Xr uniq 1 ,
|
.Xr uniq 1 ,
|
||||||
|
@ -377,17 +355,34 @@ To sort files larger than 60Mb, use
|
||||||
.Nm
|
.Nm
|
||||||
.Fl H ;
|
.Fl H ;
|
||||||
files larger than 704Mb must be sorted in smaller pieces, then merged.
|
files larger than 704Mb must be sorted in smaller pieces, then merged.
|
||||||
To protect data
|
|
||||||
.Nm
|
|
||||||
.Fl o
|
|
||||||
calls link and unlink, and thus fails in protected directories.
|
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
A
|
A
|
||||||
.Nm
|
.Nm
|
||||||
command appeared in
|
command appeared in
|
||||||
.At v6 .
|
.At v6 .
|
||||||
.Sh NOTES
|
.Sh NOTES
|
||||||
The current sort command uses lexicographic radix sorting, which requires
|
This
|
||||||
|
.Nm
|
||||||
|
has no limits on input line length (other than imposed by available
|
||||||
|
memory) or any restrictions on bytes allowed within lines.
|
||||||
|
.Pp
|
||||||
|
To protect data
|
||||||
|
.Nm
|
||||||
|
.Fl o
|
||||||
|
calls
|
||||||
|
.Xr link 2
|
||||||
|
and
|
||||||
|
.Xr unlink 2 ,
|
||||||
|
and thus fails in protected directories.
|
||||||
|
.Pp
|
||||||
|
Input files should be text files. If file doesn't end with record separator
|
||||||
|
(which is typically newline), the
|
||||||
|
.Nm
|
||||||
|
utility silently supplies one.
|
||||||
|
.Pp
|
||||||
|
The current
|
||||||
|
.Nm
|
||||||
|
uses lexicographic radix sorting, which requires
|
||||||
that sort keys be kept in memory (as opposed to previous versions which used quick
|
that sort keys be kept in memory (as opposed to previous versions which used quick
|
||||||
and merge sorts and did not.)
|
and merge sorts and did not.)
|
||||||
Thus performance depends highly on efficient choice of sort keys, and the
|
Thus performance depends highly on efficient choice of sort keys, and the
|
||||||
|
|
Loading…
Reference in New Issue