Personal tools

Sort

From MohidWiki

Revision as of 16:18, 17 April 2010 by Guillaume (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Sort is a linux command line to sort ascii lines of text.

Sorts the lines by the first field (space is default separator)

> cat file.txt | sort

Sorts the lines by the second field

> cat file.txt | sort +1 -2

+n starts sorting by the n+1-th field -m ends sorting by the m-th field

See also

External references