DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
checking if a substring exists in a string bash
string
=
'Haystack'
;
if
[
[
$string
=~
"Needle"
]
]
then
echo
"It's there!"
fi
PREVIOUS
NEXT
Tagged:
#checking
#substring
#exists
#string
#bash
ADD COMMENT
Topic
COMMENT
Name
5+4 =
Submit