Answers for "how to make if variable matches string in shell script"

5

check if variable contains string bash

STRING='Hello world'
if [[ $STRING =~ "Hello" ]] ; then echo "It's here" ; fi
Posted by: Guest on April-17-2021

Code answers related to "how to make if variable matches string in shell script"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language