I\'m writing a shell script, and I\'m trying to check if the output of a command contains a certain string. I\'m thinking I probably have to use grep, but I\'m not sure how.
A clean if/else conditional shell script:
if ./somecommand | grep -q 'some_string'; then echo "exists" else echo "doesn't exist" fi