uuencode

HI,

I want to zip it before sending to email.

-- This works fine.

uuencode gtsa_lmt_pb_rfs_daily.txt ukba_pb_rfs_daily.csv | mailx -s "ukba_pb_rfs_daily" test@abc.com

--Below command is not working, it sends zunk file.

uuencode gtsa_lmt_pb_rfs_daily.txt ukba_pb_rfs_daily.csv | gzip | mailx -s "ukba_pb_rfs_daily" test@abc.com

Please can you help me. Thanks.

gzip gtsa_lmt_pb_rfs_daily.txt ukba_pb_rfs_daily.csv

uuencode gtsa_lmt_pb_rfs_daily.txt.gz ukba_pb_rfs_daily.csv.gz | mailx -s "ukba_pb_rfs_daily" test@abc.com

or try:

tar cf - gtsa_lmt_pb_rfs_daily.txt ukba_pb_rfs_daily.csv |gzip -f |uuencode file.tar.gz |mailx -s "ukba_pb_rfs_daily" test@abc.com

HI,

Please confirm : gzip will convert .txt file .csv.

below command is not working -

$ gzip ukba_pb_rfs_daily.txt ukba_pb_rfs_daily.csv
ukba_pb_rfs_daily.csv: No such file or directory

Best Regards,

---------- Post updated at 07:11 AM ---------- Previous update was at 06:49 AM ----------

also: looking for ukba_pb_rfs_daily.csv file

tar: ukba_pb_rfs_daily.csv: No such file or directory
tar cf - gtsa_lmt_pb_rfs_daily.txt ukba_pb_rfs_daily.csv |gzip -f |uuencode file.tar.gz |mailx -s "ukba_pb_rfs_daily" test@abc.com

thanks for you advise.

gzip will will create the .gz file .

if you want to zip and send it .. try below

gzip <file name with full path> ; uuencode <file name with full path>.gz '<Name of the file which should be seen in receipt mail>' | mailx -s "subject" mail@abc.com

I want to do this way -
First: convert text file to .csv file.
Second: zip .csv
Third: then email the zipped .csv file

Thanks for your help.

rename the file by --> mv file.txt file.csv

then zip and mail it.

please can I have full script I was not able to success.

mv ukba_pb_rfs_daily.txt ukba_pb_rfs_daily.csv

compress ukba_pb_rfs_daily.csv

uuencode ukba_pb_rfs_daily.csv.Z ukba_pb_rfs_daily.csv | mailx -s "subject" test@abc.com

whats the issue/error ?

I have follow below 3 steps -

. mv ukba_pb_rfs_daily.txt ukba_pb_rfs_daily.csv
 
. compress ukba_pb_rfs_daily.csv
 
.os uuencode reports/ukba_pb_rfs_daily.csv.Z ukba_pb_rfs_daily-$FILDTE.csv |mailx -s "ukba_pb_rfs_daily" abc@test.com

I have received an email but the file format is very bad not in .csv

you need to uncompress the file and then open it..