I created this script for check whether specific files exist or not in the given location. but when I run this its always showing
Failed - Flag_lms_device_info_20160628.txt do not exist
Failed - Flag_lms_weekly_usage_info_20160628.txt do not exist
but both files are existing. appreciate help for fix this.
Scripts -
PREFIX="/opt/lms/sftp/ewduser/sampledata/"
REPORT="/tmp/flg_file_status-it360.txt"
DATE=$( date -d "${dtd} -1 days" +'%Y%m%d' )
rm -f "$REPORT"
FILENAME="Flag_lms_device_info_$DATE.txt"
FULLFN="$PREFIX/$FILENAME"
if [ -f 'find "$FULLFN"' ];then
echo "OK - Flag_lms_device_info_$DATE.txt exists" >> $REPORT
else
echo "Failed - Flag_lms_device_info_$DATE.txt doesn't exist" >> $REPORT
fi
FILENAME="/opt/data/Flag_lms_weekly_usage_info_$DATE.txt"
FULLFN="$PREFIX/$FILENAME"
if [ -f 'find "$FULLFN"' ];then
echo "OK - Flag_lms_weekly_usage_info_$DATE.txt exists" >> $REPORT
else
echo "Failed - Flag_lms_weekly_usage_info_$DATE.txt doesn't exist" >> $REPORT
fi