I have a few text files and I\'d like to count how many times a letter appears in each?
Specifically, I\'d like to use the UNIX shell to do this, in the form of: cat fil
Alternative to grep:
sed 's/[^x]//g' filename | tr -d '\012' | wc -c
where x is the character you want to count.
x