All apps/sort

sort

sort

Sort or merge records (lines) of text files.

Runs as sort|macOS, Linux, Windows

Autocomplete

Fig spec, with what the manifest adds · 35 options
Published once and never changed; check the digest before caching
sha256
051e90a5cd1bab0b056ff640473120aaa79cf12864935abbf05550d992178671
Size
7028 bytes
OptionsOn sort itself
--help
Shows help message
--version
Displays the current version of sort
-c--check-C
Check that the single input file is sorted <output>
-m--merge
Merge only. The input files are assumed to be pre-sorted. If they are not sorted the output order is undefined
-o--output
Print the output to the output file instead of the standard output <output>
-S--buffer-size
Use size for the maximum size of the memory buffer <size>
-T--temporary-directory
Store temporary files in the directory dir <dir>
-u--unique
Unique keys. Suppress all lines that have a key that is equal to an already processed one
-s
Stable sort. This option maintains the original record order of records that have an equal key
-b--ignore-leading-blanks
Ignore leading blank characters when comparing lines
-d--dictionary-order
Consider only blank spaces and alphanumeric characters in comparisons
-f--ignore-case
Convert all lowercase characters to their upper case equivalent before comparison
-g--general-numeric-sort
Sort by general numerical value
-h--human-numeric-sort
Sort by numerical value, but take into account the SI suffix, if present
-i--ignore-nonprinting
Ignore all non-printable characters
-M--month-sort
Sort by month abbreviations. Unknown strings are considered smaller than the month names
-n--numeric-sort
Sort fields numerically by arithmetic value
-R--random-sort
Sort by a random order
-r--reverse
Sort in reverse order
-V--version-sort
Sort version numbers
-k--key
Define a restricted sort key that has the starting position field1, and optional ending position field2 <field1> <field2>
-t--field-separator
Use char as a field separator character <char>
-z--zero-terminated
Use NUL as record separator
--batch-size
Specify maximum number of files that can be opened by sort at once <num>
--compress-program
Use PROGRAM to compress temporary files (eg. bzip2) <PROGRAM>
--random-source
In random sort, the file content is used as the source of the 'seed' data for the hash function choice <filename>
--debug
Print some extra information about the sorting process to the standard output
--parallel
Set the maximum number of execution threads. Default number equals to the number of CPUs
--files0-from
Take the input file list from the file filename <filename>
--radixsort
Try to use radix sort, if the sort specifications allow
--mergesort
Use mergesort. This is a universal algorithm that can always be used, but it is not always the fastest
--qsort
Try to use quick sort, if the sort specifications allow. This sort algorithm cannot be used with -u and -s
--heapsort
Try to use heap sort, if the sort specifications allow. This sort algorithm cannot be used with -u and -s
--mmap
Try to use file memory mapping system call. It may increase speed in some cases
--sort
Select how to sort values <type>
ArgumentsPositional, in order
<file>
· repeatable · filepaths