grep_output=`grep <word> <file>` if [ "$grep_output" == "" ]; then echo "not found"; else echo "found"; fi