Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

check if variable contains string bash

STRING='Hello world'
if [[ $STRING =~ "Hello" ]] ; then echo "It's here" ; fi
 
PREVIOUS NEXT
Tagged: #check #variable #string #bash
ADD COMMENT
Topic
Name
4+6 =