Hi All,
Im facing a problem with sending tar file via mailx command. Your help would be much appreciated.
Im trying to tar a set of CSV files in a folder using the below command
tar cvf Report.tar.gz *_03172016.CSV
and sending this tar file using mailx command as mentioned below
ux2dos Report.tar.gz | uuencode Report.tar.gz | mailx -m -s "UAT Report" "abc@hotmail.com"
The problem here is, if all the CSV files are of size 0 byte, the tar file contains all the 0byte CSV files in the email attachment.
If any of the file size greater than zero, then the attachment contains files until a non zero byte file is encountered in the alphatebetically sorted list.
PS : i tried to ftp the tar file manually to windows and chkd it, and in both cases, all the CSV s files were present in the tar.
I know its confusing.. I've attached the email and the manually ftp'ed tar file for your ref
Looks like smethg is goin wrong in the mailx command.
Kindly share your inputs to fix the issue.
Also let me know if there are any other ways to zip and send all the CSV files as email attachment.