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
grep is for files or stdin. If you want to use a variable as stdin then you need to use bash's herestring notation:
if grep -q "$shrt_str" <<< "$long_str" ; then