sort(1) | sort lines of text files |
sort(1P, 1p) | sort, merge, or sequence check text files |
himalaya-sort, sort(1) | Sort envelopes by the given criteria and matching the given query |
SORT(1) | User Commands | SORT(1) |
sort - sort lines of text files
sort [OPTION]... [FILE]...
sort [OPTION]... --files0-from=F
Write sorted concatenation of all FILE(s) to standard output.
With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too. Ordering options:
Other options:
KEYDEF is F[.C][OPTS][,F[.C][OPTS]] for start and stop position, where F is a field number and C a character position in the field; both are origin 1, and the stop position defaults to the line's end. If neither -t nor -b is in effect, characters in a field are counted from the beginning of the preceding whitespace. OPTS is one or more single-letter ordering options [bdfgiMhnRrV], which override global ordering options for that key. If no key is given, use the entire line as the key. Use --debug to diagnose incorrect key usage.
SIZE may be followed by the following multiplicative suffixes: % 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y, R, Q.
*** WARNING *** The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses native byte values.
Written by Mike Haertel and Paul Eggert.
GNU coreutils online help:
<https://www.gnu.org/software/coreutils/>
Report any translation bugs to
<https://translationproject.org/team/>
Copyright © 2023 Free Software Foundation, Inc. License
GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
shuf(1), uniq(1)
Full documentation
<https://www.gnu.org/software/coreutils/sort>
or available locally via: info '(coreutils) sort invocation'
February 2024 | GNU coreutils 9.4 |