hi every one i have written this simple shell for counting number of word that user need to find from file
but i have get several error when run it. can someone tell me the problem ?
echo "Enter the file name"
read file
echo "enter word"
read word
for i in \`cat $file`
do
if [ $i == $word ]
then
count=\`expr $count + 1`
fi
done
echo "number of words: $count"