Re: How to send mails with attachments for each file in a directory ?
On Tue, Jan 29, 2008 at 07:01:47PM +0200, Jabka Atu wrote:
> find *.jpg -exec uuencode '{}' '{}' | mail someone@gmail.com \;
>
> but this won't work since :
>
> find: missing argument to `-exec'
>
> No message, no subject; hope that's ok
> Can't send mail: sendmail process failed with error code 1
>
> when working with only one file :
>
> uuencode file.jpg file.jpg | mail someone@gmail.com \;
>
> this works perfectly.
Could you throw xargs into the pipeline somewhere? It runs a command
once for each line of input.
Doug.
Reply to: