checking the variable contains string bash code example
Example: check if variable contains string bash
STRING='Hello world'
if [[ $STRING =~ "Hello" ]] ; then echo "It's here" ; fi
STRING='Hello world'
if [[ $STRING =~ "Hello" ]] ; then echo "It's here" ; fi