cheat-fork-echo/cheat/cheatsheets/sort

12 lines
179 B
Plaintext
Raw Normal View History

2013-09-08 15:23:00 +02:00
# To sort a file:
sort file
2013-09-08 15:43:25 +02:00
# To sort a file by keeping only unique:
2013-09-08 15:23:00 +02:00
sort -u file
# To sort a file and reverse the result:
sort -r file
2013-09-08 15:43:25 +02:00
# To sort a file randomly:
2013-09-08 15:23:00 +02:00
sort -R file