View Single Post
Old May 25th, 2008, 9:29 AM   #2
nuvox
Newbie
 
Join Date: May 2008
Posts: 2
Rep Power: 0 nuvox is on a distinguished road
Re: if condition and grep

okay, figured it out.
grep_output=`grep <word> <file>`
if [ "$grep_output" == "" ]; then
    echo "not found";
else
    echo "found";
fi
nuvox is offline   Reply With Quote