Sort notes

From Noah.org
Revision as of 14:57, 5 January 2009 by Root (Talk | contribs) (New page: Category:Engineering Using GNU `sort` to sort IP addresses (long and sort form): <pre> sort --numeric-sort --field-separator=. --key=1,1 --key=2,2 --key=3,3 --key=4,4 sort -n -t . -k...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Using GNU `sort` to sort IP addresses (long and sort form):

sort --numeric-sort --field-separator=. --key=1,1 --key=2,2 --key=3,3 --key=4,4
sort -n -t . -k 1,1 -k 2,2 -k 3,3 -k 4,4