Hi
This will be useful who is looking for checking the files in a directory
#chmod 777 /cronacle/tools/teradata/opo/bin/file_check.sh
SUBJECT=`echo "File Not Found"`
SUBJECT1=`echo "File Found"`
#RECIPIENT=Madhu.Reddy@ge.com
cd /cronacle/tools/teradata/opo/bin
file_list=attach.sh
if [ -s $file_list ]
then
echo $file_list "$SUBJECT1" | mailx -s "$SUBJECT1" abc@abc.com
exit 1
else
echo $file_list "$SUBJECT" | mailx -s "$SUBJECT" abc@abc.com --mail id
exit 0
fi
Thanks
Babu