1753816 Members
8452 Online
108805 Solutions
New Discussion юеВ

uuencode

 
SOLVED
Go to solution
Don Bentz
Regular Advisor

uuencode

I am trying to use uuencode to compress a large pdf file and generate an ouptut file that can be attached to an email. When I simply enter "uuencode filename" the output (as the man page says) goes to my screen. I can't seem to redirect it to an output file. When I enter "uuencode filename outfile" the same thing happens and "outfile" is empty. When I enter "uuencode filename > outfile" nothing seems to be happening.
Insecurity is our friend. It keeps you dependent.
13 REPLIES 13
RAC_1
Honored Contributor

Re: uuencode

I played with command for a while. This command works for me.

uuencode file_name file_name.txt > what_ever_file_name_you_want

Anil
There is no substitute to HARDWORK
Darren Prior
Honored Contributor

Re: uuencode

Hi Don,

When you say nothing is happening when you redirect the output to a file - does the shell prompt return or is the uuencode just hanging?

If the prompt returns have a look and see if outfile exists...

regards,

Darren.
Calm down. It's only ones and zeros...
Rodney Hills
Honored Contributor
Solution

Re: uuencode

uuencode inputfile remotename >outputfile

inputfile - file to read from
remotename - file name to embed in the result
outputfile - result of uuencode

HTH

-- Rod Hills
There be dragons...
Don Bentz
Regular Advisor

Re: uuencode

Darren - the shell prompt does not return. It appears to be just hanging. When I look at the process in glance and check "open files" I see only 1 write for the "output" file and there is no other disk activity for it.
Insecurity is our friend. It keeps you dependent.
Darren Prior
Honored Contributor

Re: uuencode

Hmmm - when you sent the output to the screen, roughly how long did it take to complete? Or did you hit Ctrl-C after a little bit?

What size is the input file?

regards,

Darren.
Calm down. It's only ones and zeros...
Don Bentz
Regular Advisor

Re: uuencode

Rodney - thanks for your reply. This worked as you described - 10 for you! Darren - I waited until it ended. How long - kinda, but not materially annoying. Now the only problem is how to get that ".PDF" file usable as a mail attachment! So far I seem to get the "skunk eye" from Acrobat, - "file is corrupted or unrecognizable". BUT, the uuencode question was resolved. Thanks again.
Insecurity is our friend. It keeps you dependent.
Steven E. Protter
Exalted Contributor

Re: uuencode

I would do this.

use gzip to compress the file and the script I'm attaching to send the attachment. The script is well documented and includes multi word subject sentences.

This script could be modified to gzip the file as well. Its just one line of code and then changing the two parameters that deal with filename.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Rita C Workman
Honored Contributor

Re: uuencode

Well...bypassing the whole thing about compression...I just did a little test with my favorite utility to mail files as attachments....Yes the include statement.

I created an include file with 1 line....

[include /opt/perf/paperdocs/gp/C/GP-install.pdf application/adobe base64]

Since I knew this was a pdf file...and it was small enough so that our GroupWise Admin would allow it to pass through...See we relay off GroupWise and he has alot of restrictions on it...

But...lo and behold, up popped my email with the pdf file sitting all nice and neat as an attachment - and sure enough when I clicked on it...Adobe Glance Plus for (10.20 and 11.x)

Oh well...just thought I'd throw this into the mix..

Regards,
Rita
Don Bentz
Regular Advisor

Re: uuencode

Thanks for the reply, Rita. Unfortunately the issue has to do (apparently) with the sheer "mass" of some of the "lines" in the pdf file we're sending. Our homegrown utility, which builds MIME headers and sends email using sendmail with attachments, works just fine with OTHER pdfs and no specific "Content-type", etc. coding. The files we're trying to send have huge graphics images generated using Adobe Illustrator. So far I've tried to do it using "uuencode", unfortunately Adobe doesn't recognize these on the receiving end.
Insecurity is our friend. It keeps you dependent.