Ravi Sir's Cards › AWS
Count words with bash only?
This interview card answers: Count words with bash only? Declare -A counter. Add one per word. Print keys and values.
Read card text
What this card says
What it is
declare -A counter.
Why it matters
Add one per word.
((cnt[$w]++))
How / example
Print keys and values.