Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
atiedebee
18 days ago
|
parent
|
context
|
favorite
| on:
Simple Is Not Small
I imagine just ask would be enough for most usecases:
awk '{ freq[$0] += 1 } END { for (n in freq ){ print freq[n] " " n } }' < file.txt
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
awk '{ freq[$0] += 1 } END { for (n in freq ){ print freq[n] " " n } }' < file.txt