There is also the book "Exercises in Programming Style" that uses the term frequency problem to illustrate 33 different programming paradigms (including a shell solution).
https://www.amazon.com/Exercises-Programming-Style-Cristina-...
https://www.amazon.com/Exercises-Programming-Style-Cristina-...
I had seen it a while ago and blogged about it here, with solutions (approx.) in Python and shell:
The Bentley-Knuth problem and solutions:
https://jugad2.blogspot.com/2012/07/the-bentley-knuth-proble...
Also, previous HN thread about it here:
Revisiting Knuth and McIlroy's word count programs (2011) (franklinchen.com)
https://news.ycombinator.com/item?id=15264997