Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.