Hello. I'm trying to check for the existence of a string from program output.
E.g. (not a real application but I just want to give an example)
I want to check for the existence of the word "cow" in the program output. Something like
I tried searching the net but I'm not really sure what to look for. There must be a command to do it. I'm just not sure what it is.
Any ideas what script/program could do it for me? Thanks a lot again!
E.g. (not a real application but I just want to give an example)
Code:
#my-app-here list
The cow jump over the moon.
#
Code:
if [ "cow" is a substring of "`my-app-here list`" ]; then
echo "I love beef"
fi
I tried searching the net but I'm not really sure what to look for. There must be a command to do it. I'm just not sure what it is.
Any ideas what script/program could do it for me? Thanks a lot again!