bash script if match string variable 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