Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
BuildTheRobots
· 1y ago · 0 comments
It's something I've done myself in the past. First sort is because it needs to be sorted for uniq -c to count it proper, second sort because uniq doesn't always give the output in the right order.
Comments
[–]
evertedsphere
1y ago
more precisely, uniq produces output in the same order as the input to it, just collapsing runs / run-length encoding it