I'm doing a scipt to search a log file with an age and compare who has a string of text within the log, if it is correct to proceed to make a function, but not effected. I appreciate any advice or help
#!/bin/bash
file= find /AUX/backup/log/ -iname "*.log" -daystart -type f -mtime 1
if cat $file | grep -qw “INF - Status = completed."
then
echo "there is OK"
else
echo "there is KO"
fi