I need to check if the string M1039C28 is inside any file of the directory /var/opt.
It should echo true if the string is found or echo String not found if the string is not found.
Sample:
cd /var/opt/;
if [ find ./ -type f -exec grep -Hni "M1039C28" {} ';']
then
echo "String found"
else
INFO "String not found"
fi