Horje
bash if substring Code Example
bash if substring
string='Hi substring' #To check if string has "Mylong" substring do
if [[ $string == *"substring"* ]]; then
  echo "String has substring"
fi
checking if a substring exists in a string bash
string='Haystack';

if [[ $string =~ "Needle" ]]
then
   echo "It's there!"
fi




Shell

Related
is firewall running centos 7 Code Example is firewall running centos 7 Code Example
brew install iterm2 Code Example brew install iterm2 Code Example
sed remove empty lines Code Example sed remove empty lines Code Example
how to unrar in linux Code Example how to unrar in linux Code Example
brew install atom Code Example brew install atom Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
16