Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to email multiple text files

Status
Not open for further replies.

gogo36

Programmer
Jun 3, 2005
7
US
This is what I have but its not working, please help..

uuencode /export/genprd/APPL/ORACLE/inbound/864/*.dat EDI_864_MESSAGE.dat | mailx -s "EDI 864 MESSAGE" email@dfjdk.com

Its email me but the .dat files are not attached and I am getting this message

Usage: uuencode [-m] [infile] remotefile

Unix gods please help

JG
 
You can only uuencode one file at a time, are you sure /export/genprd/APPL/ORACLE/inbound/864/*.dat is only matching one filename?

If there are multiple files you will need to do a loop, e.g.

Code:
( for f in /export/genprd/APPL/ORACLE/inbound/864/*.dat
do
    uuencode $f $(basename $f)
done ) | mailx -s "EDI 864 MESSAGE" email@dfjdk.com

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top