I am trying to grep for a small string in a much larger string. Both strings are being stored as variables and here is a code example:
#!/bin/bash long_str=$(m
Another Bash-specific technique:
if [[ $long =~ $short ]] # regex match then echo "yes" fi
But if you don't need the long string in a variable:
if man man | grep $short; then ...
but I'm assuming that was just for the purpose of having an example.