A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 20:36:05 +00:00
|
|
|
# sort
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Sort lines of text files.
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 20:36:05 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Sort a file in ascending order:
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 20:36:05 +00:00
|
|
|
|
|
|
|
`sort {{filename}}`
|
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Sort a file in descending order:
|
A bunch of new pages:
common/: dig, gzip, rm, sort, zfs, zpool
linux/: apt-get, shutdown
osx/: airport, caffeinate, diskutil, networksetup open, pgrep, qlmanage, say, shutdown, sysctl, system_profiler
Edits to existing pages:
curl: Added simple download example
find: Added iname and size exmaples
grep: Edited -c description
ps: Added wide lines example
ssh: edited -D description, added simple port forwarding example
unzip: added list option
2014-02-10 20:36:05 +00:00
|
|
|
|
|
|
|
`sort -r {{filename}}`
|
|
|
|
|
2016-05-10 14:09:55 +01:00
|
|
|
- Sort a file using numeric rather than alphabetic order:
|
2016-03-30 16:13:36 +01:00
|
|
|
|
|
|
|
`sort -n {{filename}}`
|
|
|
|
|
2016-05-10 14:12:37 +01:00
|
|
|
- Sort the passwd file by the 3rd field, numerically:
|
|
|
|
|
|
|
|
`sort -t: -k 3n /etc/passwd`
|
|
|
|
|
2016-03-30 16:13:36 +01:00
|
|
|
- Sort a file preserving only unique lines:
|
|
|
|
|
|
|
|
`sort -u {{filename}}`
|
2018-10-16 18:29:50 +01:00
|
|
|
|
|
|
|
- Sort human-readable numbers (in this case the 5th field of `ls -lh`):
|
|
|
|
|
|
|
|
`ls -lh | sort -h -k 5`
|