1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:04:56 +02:00
tldr/pages/common/sort.md
lord63 fbd8c639ff Don't exclude markown md038 warning, close #314
also fix the md038 warning in common/sort.md
2015-11-03 20:24:36 +08:00

15 lines
216 B
Markdown

# sort
> sort lines of text files
- Sort a file in ascending order
`sort {{filename}}`
- Sort a file in descending order
`sort -r {{filename}}`
- Sort passwd file by the 3rd field
`sort -t: -k 3n /etc/passwd`