I've got several different directories that contain different versions of some files. I want to count a symbol in all versions of the same file. Here is an example of the hierarchy.
directory version1 1_file.txt 2_file.txt ... version2 1_file.txt 2_file.txt ... ...
I've tried the following:
symbol=\> for i in 1 2 3; do grep -roh $symbol $i\_file.txt | wc -w; done