Title: Theory / Unimportant / CS / command line / text streaming / sort
Tags: computer_to_instruction fromCommandLine hasNotNewEffectReturnsMeaning

Instruction: sort foo_1 ... foo_n
Page: man
Effect: Write sorted concatenation of all files foo_i to standard output.
Context: sort

Instruction: sort -
Page: man
Effect: Write sorted concatenation of standard input
Context: sort

Fla: --ignore-leading-blanks
Effect: ignore leading blanks
Prefix: sort
Flag abbreviation: -b

Fla: --dictionary-order
Effect: consider only blanks and alphanumeric characters
Prefix: sort
Flag abbreviation: -d

Fla: --ignore-case
Effect: fold lower case to upper case characters
Prefix: sort
Flag abbreviation: -f

Fla: --general-numeric-sort
Effect: compare according to general numerical value
Prefix: sort
Flag abbreviation: -g

Fla: --ignore-nonprinting
Effect: consider only printable characters
Prefix: sort
Flag abbreviation: -i

Fla: --month-sort
Effect: compare (unknown) < 'JAN' < ... < 'DEC'
Prefix: sort
Flag abbreviation: -M

Fla: --human-numeric-sort
Effect: compare human readable numbers (e.g., 2K 1G)
Prefix: sort
Flag abbreviation: -h

Fla: --numeric-sort
Effect: compare according to string numerical value
Prefix: sort
Flag abbreviation: -n

Fla: --random-sort
Effect: sort by random hash of keys
Prefix: sort
Flag abbreviation: -R

Fla: --random-source=FILE
Effect: get random bytes from FILE
Prefix: sort

Fla: --reverse
Effect: reverse the result of comparisons
Prefix: sort
Flag abbreviation: -r

Fla: --sort=WORD
Effect: sort according to WORD: general-numeric -g, human-numeric -h, month -M, numeric -n, random -R, version -V
Prefix: sort

Fla: --version-sort
Effect: natural sort of (version) numbers within text
Prefix: sort
Flag abbreviation: -V

Fla: --batch-size=NMERGE
Effect: merge at most NMERGE inputs at once. For more use temp files
Prefix: sort

Fla: --check, --check=diagnose-first
Effect: check for sorted input. Do not sort
Prefix: sort
Flag abbreviation: -c

Fla: --check=quiet, --check=silent
Effect: like -c, but do not report first bad line
Prefix: sort
Flag abbreviation: -C

Fla: --compress-program=PROG
Effect: compress temporaries with PROG. decompress them with PROG -d
Prefix: sort

Fla: --files0-from=Foo
Effect: read input from the files specified by NUL-terminated names in file Foo.
Prefix: sort

Fla: --key=POS1[,POS2]
Effect: start a key at POS1 (origin 1), end it at POS2 (default end of line)
Prefix: sort
Flag abbreviation: -k

Fla: --merge
Effect: merge already sorted files. do not sort
Prefix: sort
Flag abbreviation: -m

Fla: --output=FILE
Effect: write result to FILE instead of standard output
Prefix: sort
Flag abbreviation: -o

Fla: --stable
Effect: stabilize sort by disabling last-resort comparison
Prefix: Sort
Flag abbreviation: -s

Fla: --buffer-size=SIZE
Effect: use SIZE for main memory buffer
Prefix: sort
Flag abbreviation: -S

Fla: --field-separator=SEP
Effect: use SEP instead of non-blank to blank transition
Prefix: sort
Flag abbreviation: -t

Fla: --temporary-directory=DIR
Effect: use DIR for temporaries, not $TMPDIR or /tmp. multiple options specify multiple directories
Prefix: sort
Flag abbreviation: -T

Fla: --unique
Effect: with -c, check for strict ordering. without -c, output only the first of an equal run
Prefix: sort
Flag abbreviation: -u

Fla: --zero-terminated
Effect: end lines with 0 byte, not newline
Prefix: sort
Flag abbreviation: -z

Fla: --help
Effect: display this help and exit
Prefix: sort

Fla: --version
Effect: output version information and exit
Prefix: sort

Fla: --files0-from=-
Effect: Read names from standard input
Prefix: sort