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.
Another option is to check for regular expression match on the command output.
For example:
[[ "$(./somecommand)" =~ "sub string" ]] && echo "Output includes 'sub string'"