Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 198 Bytes

word-frequency.md

File metadata and controls

8 lines (6 loc) · 198 Bytes

Solution

# Read from the file words.txt and output the word frequency list to stdout.

sed 's/ /\n/g' words.txt | sort | grep -P "\w+" | uniq -c | sort -r | awk '{print $2, $1}'