Skip to content

Glossary: Command Line for IT: Bash and PowerShell

sort

Also written: sort -rn, sort -u, sort -n

Sorts lines: -n sorts as numbers, -r reverses the order, and -u keeps one copy of each value. So sort -u | wc -l counts distinct values.

Where the book teaches it

Related terms

uniqSort-Object