Write a shell script with find, cat and if

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 grep -qw “INF - Status = completed."  < $file
then
  echo "there is OK" 
else
  echo "there is KO" 
fi

source:http://stackoverflow.com/questions/14341535/write-a-shell-script-with-find-cat-and-if

Tags: , , , , , , , , ,