trying to check if the file is getting updated or not

#!/bin/sh
#set -x
Current_Date=`date +"%b %e"`
Filepmdate=`ls -ltr /file/ | tail -5 | awk '{print $6,$7}'`
if [ "$Current_Date" = "$i" ] ; then
echo " "
exit 0
else
echo "Log files are not updated please check"
exit 0
fi
done

> sh -x l12.sh
+ + date +%b %e
Current_Date=Aug 26
+ + ls -ltr /file/
+ awk {print $6,$7}
+ tail -5
Filepmdate=Aug 26
Aug 26
Aug 26
Aug 26
Aug 26
+ [ Aug 26 = ]
+ echo Log files are not updated please check
Log files are not updated please check
+ exit 0

how do i compare four dates to one date here.is this completely wrong .please help and thanks in advance

ls -ltr /file/ 

will list all files under the folder /file, tail -5 will list the last 5 files, that's why you get five "Aug 26".

---------- Post updated at 03:49 PM ---------- Previous update was at 03:44 PM ----------

not tested, just follow your idea and update it.

Current_Date=`date +"%b %e"`

ls -ltr /file/ | tail -5 | awk '{print $6,$7}' | while read i
do
  if [[ "$Current_Date" == "$i" ]] ; then
     echo " "
     exit 0
  else
     echo "Log files are not updated please check"
     exit 0
  fi
done

yes its the last five files.thanks you for ure response

---------- Post updated at 01:36 AM ---------- Previous update was at 01:15 AM ----------

+ + date +%b %e
Current_Date=Aug 26
+ + ls -ltr /file/
+ awk {print $6,$7}
+ tail -5
log1.sh[11]: Aug 26^JAug 26^JAug 26^JAug 26^JAug 26: cannot open
getting this how do we get the timestamp also even $8