bash find string in program output code example Example: bash find string in program output ./somecommand | grep -q 'string' && echo 'matched'