Bash Find String na saída do programa

./somecommand | grep -q 'string' && echo 'matched'
null234