bash check if string in path code example
Example 1: substring if statement variable shell script
string="My string"
Example 2: substring if statement variable shell script
if [ $string ?? 'foo' ]; then
echo "It's there!"
fi
string="My string"
if [ $string ?? 'foo' ]; then
echo "It's there!"
fi