I have a string in Bash:
string=\"My string\"
How can I test if it contains another string?
if [ $string ?? \'foo\' ]; then
msg="message" function check { echo $msg | egrep [abc] 1> /dev/null if [ $? -ne 1 ]; then echo "found" else echo "not found" fi } check
This will find any occurance of a or b or c