Hi guys I am using grep in a bash script to look for a string and i would like to check if the string was found
so my script goes a little some thing like this !!!
Code:
grep bboy /var/log/messages
echo $?
so assumed that since the string bboy was not in /var/log/messages I would get the value higher than 0 but wether or not the string is in /var/log/messages I still get the valure 0
why?