sort.1.in (51dd214c84efceda87c2ac10d34b7e3ee5b6c28f) | sort.1.in (f79477ebd57d7b0e69654281387ba5db8950ebd8) |
---|---|
1.\" $OpenBSD: sort.1,v 1.31 2007/08/21 21:22:37 millert Exp $ | 1.\" $OpenBSD: sort.1,v 1.45 2015/03/19 13:51:10 jmc Exp $ |
2.\" $FreeBSD$ 3.\" 4.\" Copyright (c) 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" This code is derived from software contributed to Berkeley by 8.\" the Institute of Electrical and Electronics Engineers, Inc. 9.\" --- 18 unchanged lines hidden (view full) --- 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)sort.1 8.1 (Berkeley) 6/6/93 35.\" | 2.\" $FreeBSD$ 3.\" 4.\" Copyright (c) 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" This code is derived from software contributed to Berkeley by 8.\" the Institute of Electrical and Electronics Engineers, Inc. 9.\" --- 18 unchanged lines hidden (view full) --- 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)sort.1 8.1 (Berkeley) 6/6/93 35.\" |
36.Dd July 3, 2012 | 36.Dd March 19 2015 |
37.Dt SORT 1 38.Os 39.Sh NAME 40.Nm sort 41.Nd sort or merge records (lines) of text and binary files 42.Sh SYNOPSIS 43.Nm sort 44.Bk -words --- 110 unchanged lines hidden (view full) --- 155Consider only blank spaces and alphanumeric characters in comparisons. 156.It Fl f , Fl Fl ignore-case 157Convert all lowercase characters to their uppercase equivalent 158before comparison, that is, perform case-independent sorting. 159.It Fl g, Fl Fl general-numeric-sort, Fl Fl sort=general-numeric 160Sort by general numerical value. 161As opposed to 162.Fl n , | 37.Dt SORT 1 38.Os 39.Sh NAME 40.Nm sort 41.Nd sort or merge records (lines) of text and binary files 42.Sh SYNOPSIS 43.Nm sort 44.Bk -words --- 110 unchanged lines hidden (view full) --- 155Consider only blank spaces and alphanumeric characters in comparisons. 156.It Fl f , Fl Fl ignore-case 157Convert all lowercase characters to their uppercase equivalent 158before comparison, that is, perform case-independent sorting. 159.It Fl g, Fl Fl general-numeric-sort, Fl Fl sort=general-numeric 160Sort by general numerical value. 161As opposed to 162.Fl n , |
163this option handles general floating points, which have a much 164permissive format than those allowed by 165. Fl n , | 163this option handles general floating points. 164It has a more 165permissive format than that allowed by 166.Fl n |
166but it has a significant performance drawback. 167.It Fl h, Fl Fl human-numeric-sort, Fl Fl sort=human-numeric 168Sort by numerical value, but take into account the SI suffix, 169if present. 170Sort first by numeric sign (negative, zero, or 171positive); then by SI suffix (either empty, or `k' or `K', or one 172of `MGTPEZY', in that order); and finally by numeric value. 173The SI suffix must immediately follow the number. --- 68 unchanged lines hidden (view full) --- 242option, it applies globally to all key specifications. 243Otherwise, 244.Fl b 245can be attached independently to each 246.Ar field 247argument of the key specifications. 248.Fl b . 249.It Xo | 167but it has a significant performance drawback. 168.It Fl h, Fl Fl human-numeric-sort, Fl Fl sort=human-numeric 169Sort by numerical value, but take into account the SI suffix, 170if present. 171Sort first by numeric sign (negative, zero, or 172positive); then by SI suffix (either empty, or `k' or `K', or one 173of `MGTPEZY', in that order); and finally by numeric value. 174The SI suffix must immediately follow the number. --- 68 unchanged lines hidden (view full) --- 243option, it applies globally to all key specifications. 244Otherwise, 245.Fl b 246can be attached independently to each 247.Ar field 248argument of the key specifications. 249.Fl b . 250.It Xo |
250.Sm off 251.Fl k\ \& Ar field1 Op , Ar field2 , Fl Fl key Ns = Ns Ar field1 Op , Ar field2 252.Sm on | 251.Fl k Ar field1 Ns Op , Ns Ar field2 , 252.Fl Fl key Ns = Ns Ar field1 Ns Op , Ns Ar field2 |
253.Xc 254Define a restricted sort key that has the starting position 255.Ar field1 , 256and optional ending position 257.Ar field2 258of a key field. 259The 260.Fl k --- 68 unchanged lines hidden (view full) --- 329.It Fl Fl debug 330Print some extra information about the sorting process to the 331standard output. 332%%THREADS%%.It Fl Fl parallel 333%%THREADS%%Set the maximum number of execution threads. 334%%THREADS%%Default number equals to the number of CPUs. 335.It Fl Fl files0-from Ns = Ns Ar filename 336Take the input file list from the file | 253.Xc 254Define a restricted sort key that has the starting position 255.Ar field1 , 256and optional ending position 257.Ar field2 258of a key field. 259The 260.Fl k --- 68 unchanged lines hidden (view full) --- 329.It Fl Fl debug 330Print some extra information about the sorting process to the 331standard output. 332%%THREADS%%.It Fl Fl parallel 333%%THREADS%%Set the maximum number of execution threads. 334%%THREADS%%Default number equals to the number of CPUs. 335.It Fl Fl files0-from Ns = Ns Ar filename 336Take the input file list from the file |
337.Ar filename. | 337.Ar filename . |
338The file names must be separated by NUL 339(like the output produced by the command "find ... -print0"). 340.It Fl Fl radixsort 341Try to use radix sort, if the sort specifications allow. 342The radix sort can only be used for trivial locales (C and POSIX), 343and it cannot be used for numeric or month sort. 344Radix sort is very fast and stable. 345.It Fl Fl mergesort --- 293 unchanged lines hidden --- | 338The file names must be separated by NUL 339(like the output produced by the command "find ... -print0"). 340.It Fl Fl radixsort 341Try to use radix sort, if the sort specifications allow. 342The radix sort can only be used for trivial locales (C and POSIX), 343and it cannot be used for numeric or month sort. 344Radix sort is very fast and stable. 345.It Fl Fl mergesort --- 293 unchanged lines hidden --- |