Practice: Count Words
Pipe text through standard tools.
Example
text="the cat and the hat and the bat"
echo "$text" | tr " " "\n" | sort | uniq -c | sort -rn | head -n 3Result
3 the
2 and
1 hatExercise
Count unique words.
sort | uniq Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.