Answers for "if has bash"

1

if has bash

string='Hi substring' #To check if string has "Mylong" substring do
if [[ $string == *"substring"* ]]; then
  echo "String has substring"
fi
Posted by: Guest on May-26-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language