I have a string ${testmystring} in my .sh script and I want to check if this string does not contain another string.
if [[ ${testmystring} doesNotContain *"c0"* ]];then
# testmystring does not contain c0
fi
How can I do that, i.e. what is doesNotContain supposed to be?
[[ $testmystring != *c0* ]] && echo testmystring does not contain c0elseor not like in:if ! stringContain "c0" "$myteststring" ;then ....