Word Count Table
Count how often each word appears in text.txt. A word is a run of letters, and capitals count the same as small letters. Print one line per word, in small letters, as the word, a space and its count: the most common first, and words with the same count in alphabetical order.
Example 1
text.txt
The cat saw the dog. The dog ran!
prints
the 3 dog 2 cat 1 ran 1 saw 1
Constraints
- Up to 8 lines of letters, spaces and punctuation
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Bash problems
- Count the LinesBeginner
- Count the WordsBeginner
- First Three LinesBeginner
- Hello, NameBeginner
- How Many ErrorsBeginner
- Into a New FolderBeginner
- Last Two LinesBeginner
- Lines With ERRORBeginner