Hands-on task
Count the votes
A team was choosing a language for its internal scripts. Each vote is written on its own line in /root/data/votes.txt.
Count how many votes each language got and save the result to /root/results.txt: one line per language, each with the vote count and the name, the way uniq -c prints it (for example, 3 java). The order of lines doesn't matter. Do it in one line by joining commands with the | sign.
- uniq -c
- sort
- pipe |
- counting repeats