Hands-on task
This task is step 11 of the course “awk and datamash: reports from tables”
awk: top 3 by frequency
In /root/words.txt there is one word per line. Count the frequency of each word and output the top 3 most frequent to /root/top.txt in the format word frequency, in descending order of frequency.
What you'll practise:
- awk
- associative arrays
- frequency counting
- sort
- head