grep -o “value” <<< "$var"

How can I find out whether a variable called $vech contains a substring called ‘car’ under bash?

vech=’car bus bike rail airplane’

{ 0 comments }