If I want to check to see if a message contains an “error” how would I go about that?
string1="operation was successful"
string2="operation contained an error"
string3="error"
[[ $string2 = *error* ]]; echo $? # this would work but I don't want to hardcode the "error"
[[ $string2 = ?????? ]]; exho $?