thank you - peter.herlihy & RTM for your response.
peter.herlihy -> It seems like '&&' is not working with my program.
RTM -> status=`echo $?` is working fine.
So, the problem I posted here has been resolved partially now because...
I was using my own company email id to test automated email generation with attached fine and it was working fine. Now, I find out that if I use my external email (like yahoo), attached file is being sent as a body of an email. Currently, I'm using...
uuencode /export/DATA_DIR/encrypted.file attachment.file | mailx -s "Schedule file delivery"
myname@company.com
I have no authority or access to download anything on UNIX box. Is there anything else (which is in built) I can use or any syntax change ???
I'm very greatful to the people who are giving their valuable time here.