|Are you certain that you are using the correct option to grep:|
set mycnt=`grep -l $1 * | wc -l`
echo "Total number of files containing '$1' (selected word) is: $mycnt"
I'm not having any trouble. If I search for the word: while in my particlar case I get this output:
Total number of files containing 'while' (selected word) is: 7