Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Shell/Bash
checking if a substring exists in a string bash
chrylis
Programming language:
Shell/Bash
2021-07-02 07:05:34
0
Q:
checking if a substring exists in a string bash
Arrowfar
Code:
Shell/Bash
2021-01-25 12:51:49
string='Haystack'; if [[ $string =~ "Needle" ]] then echo "It's there!" fi
3
Tags
string
sub
Related
check if word at end of string regex bash
bash print line if column value is in column of another file
bash check if variable is a number
bash ls without substring
bash print rows that contain substring in field
bash if file contains string
bash check if string ends with slash
bash check if string does not exist in file
bash print substring of a field
bash check if string in file
bash if string does not start with
bash ls exclude substring
New to Communities?
Join the community