Operating System - HP-UX
1836204 Members
4709 Online
110096 Solutions
New Discussion

UUDECODE a file sent from Outlook

 
Tim_15
New Member

UUDECODE a file sent from Outlook

I'm trying to send a attachment file to a UNIX box and run a script off of this file. I have the aliases defined OK. For some reason when I run the script to UUDECODE the attachment file it gets some kind of corruption in it. This is what I have for the /etc/mail/aliasies

# LOCAL aliases
label_print : | /home/userid/scripts/label

What do I need in the script to allow me to UUDECODE the attachmet and store the file.
6 REPLIES 6
Robin Wakefield
Honored Contributor

Re: UUDECODE a file sent from Outlook

Hi,

Are any errors generated, and, although you don't show them, have you got quotes around the alias?

rgds, Robin
Tim_15
New Member

Re: UUDECODE a file sent from Outlook

No errors that I can see. I do not have quotes around the aliases. I will try this.

Label_print : " | /home/userid/scripts/label"

The Label script looks like this.
> /tmp/label_note
while read line; do
echo "${line}" >> /tmp/label_note
done
cd /tmp/label_file
/usr/bin/uudecode /tmp/label_note
exit

It appears it still is getting corrupt data in the file. Any ideas?? Thanks
Jeff Schussele
Honored Contributor

Re: UUDECODE a file sent from Outlook

Hi Tim,

You *may* be overwriting the source file before decoding is complete.

Try this:

/usr/bin/uudecode /tmp/label_note /tmp/label_note.out

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Tim_15
New Member

Re: UUDECODE a file sent from Outlook

I reviewed the man page and using uudecode it shows you only specify one file as output.
When I tried doing both it does not work. The
strang thing is that ELM works OK. If I send the note to a UNIX box and then us ELM and save the filethen UUDECODE the file looks OK.
It appears that the script is doing something
wrong.
Ian Box
Advisor

Re: UUDECODE a file sent from Outlook

Is the file really uuencoded? I wasn't aware that Outlook could write a uuencoded file - it generally uses MIME encoding.

As elm is MIME aware, that may explain why you are able to read the file if you use elm, but not if you try to uudecode the file in your script.
Tim_15
New Member

Re: UUDECODE a file sent from Outlook

Sorry I did not mention this but when I send the note I select the OPTION tab and specify UUENCODE for attachement.