I am trying to find out the frequency of appearance of every letter in the english alphabet in an input file. How can I do this in a bash script?
Here is a suggestion:
while read -n 1 c do echo "$c" done < "$INPUT_FILE" | grep '[[:alpha:]]' | sort | uniq -c | sort -nr