sort | uniq -c | sort -n.
The classic "top offenders" pipeline:
cat log | awk '{print $1}' | sort | uniq -c | sort -nr | head
TASK
----
Count how many ERROR vs INFO vs WARN lines are in
/home/user/data/log_levels.txt and produce a count using:
sort /home/user/data/log_levels.txt | uniq -c
Pass when the output contains "ERROR".Sign in to save your code and track progress across devices.