Deleted Added
full compact
sort.1.in (251245) sort.1.in (264744)
1.\" $OpenBSD: sort.1,v 1.31 2007/08/21 21:22:37 millert Exp $
1.\" $OpenBSD: sort.1,v 1.31 2007/08/21 21:22:37 millert Exp $
2.\" $FreeBSD: head/usr.bin/sort/sort.1.in 251245 2013-06-02 09:43:48Z gabor $
2.\" $FreeBSD: head/usr.bin/sort/sort.1.in 264744 2014-04-21 22:52:18Z pfg $
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.\"
10.\" Redistribution and use in source and binary forms, with or without

--- 178 unchanged lines hidden (view full) ---

189optional minus sign, zero or more digits (including decimal point and
190possible thousand separators).
191.It Fl R, Fl Fl random-sort, Fl Fl sort=random
192Sort by a random order.
193This is a random permutation of the inputs except that
194the equal keys sort together.
195It is implemented by hashing the input keys and sorting
196the hash values.
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.\"
10.\" Redistribution and use in source and binary forms, with or without

--- 178 unchanged lines hidden (view full) ---

189optional minus sign, zero or more digits (including decimal point and
190possible thousand separators).
191.It Fl R, Fl Fl random-sort, Fl Fl sort=random
192Sort by a random order.
193This is a random permutation of the inputs except that
194the equal keys sort together.
195It is implemented by hashing the input keys and sorting
196the hash values.
197The hash function is choosen randomly.
197The hash function is chosen randomly.
198The hash function is randomized by
199.Cm /dev/random
200content, or by file content if it is specified by
201.Fl Fl random-source .
202Even if multiple sort fields are specified,
203the same random hash function is used for all of them.
204.It Fl r , Fl Fl reverse
205Sort in reverse order.
206.It Fl V, Fl Fl version-sort
207Sort version numbers.
208The input lines are treated as file names in form
209PREFIX VERSION SUFFIX, where SUFFIX matches the regular expression
210"(\.([A-Za-z~][A-Za-z0-9~]*)?)*".
211The files are compared by their prefixes and versions (leading
212zeros are ignored in version numbers, see example below).
213If an input string does not match the pattern, then it is compared
214using the byte compare function.
198The hash function is randomized by
199.Cm /dev/random
200content, or by file content if it is specified by
201.Fl Fl random-source .
202Even if multiple sort fields are specified,
203the same random hash function is used for all of them.
204.It Fl r , Fl Fl reverse
205Sort in reverse order.
206.It Fl V, Fl Fl version-sort
207Sort version numbers.
208The input lines are treated as file names in form
209PREFIX VERSION SUFFIX, where SUFFIX matches the regular expression
210"(\.([A-Za-z~][A-Za-z0-9~]*)?)*".
211The files are compared by their prefixes and versions (leading
212zeros are ignored in version numbers, see example below).
213If an input string does not match the pattern, then it is compared
214using the byte compare function.
215All string comparisions are performed in C locale, the locale
215All string comparisons are performed in C locale, the locale
216environment setting is ignored.
217.Bl -tag -width indent
218.It Example:
219.It $ ls sort* | sort -V
220.It sort-1.022.tgz
221.It sort-1.23.tgz
222.It sort-1.23.1.tgz
223.It sort-1.024.tgz

--- 415 unchanged lines hidden ---
216environment setting is ignored.
217.Bl -tag -width indent
218.It Example:
219.It $ ls sort* | sort -V
220.It sort-1.022.tgz
221.It sort-1.23.tgz
222.It sort-1.23.1.tgz
223.It sort-1.024.tgz

--- 415 unchanged lines hidden ---