Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is what I'm trying to do:

convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% -resize 35% 189_0538.JPG - | uuencode - img.jpg | mail -s "Some Picture" someid@somemail.com

The output of convert (Image Magick) should be named (file name) and it should be sent as a normal picture mail attachment. The above command does not work.

EDIT1: The error that I get when I run the above command is:

uuencode: fopen-ing -: Unknown system error
share|improve this question
Did you read uuencode's man page? There's an example in there. – Mat Aug 5 '12 at 8:27

I use sendemail to be able to easily append a file to an email from the command line. Notice the e in sendEmail

sendemail -f ADDRESS -t ADDRESS -u SUBJECT \
-a <( convert -strip -interlace Plane -gaussian-blur 0.05 -quality 85% -resize 35% 189_0538.JPG - )

The <( ... ) construction automatically creates a temporary filehandle so a regular file is not required (pretty much as you do with your pipe).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.