FahamLah

Commands

uniq

uniq [-c]

Risk: Safe

What it does

Joins repeated lines that sit together. -c counts them.

When to use it

After sort, to count how often each line appears.

Example

$ cut -d" " -f3 orders.log | sort | uniq -c

Orders per dish.