Belajar Sendiri

Commands

sort

sort [-n] [-r] [file]

Risk: Safe

What it does

Puts lines in order: A to Z, or by number with -n.

When to use it

Before uniq, or to rank results.

Example

$ sort -rn counts.txt

Biggest number first.