i am able to come out with something after some research. However, i don't know how i could report the frequency of 1-letter word up till 4-letter word in the codes. Since i have put the Field separator as "".
Another problem i'm hitting is, the program also counts and out put the whitespace that it encounters. Is there a way to make the program ignore the whitespace, or at least not print it? here's an example of my output now.
echo i am testing | bash words.sh
Character used Number of Occurrence
2 <<<can i get rid of this? tell the program not to print the count for whitespace?
print "Character used\t Number of Occurrence"
for (i in count)