[KLUG Members] Re: Can uuencode pass multiple files -- "just for it"

Rinaldi J. Montessi members@kalamazoolinux.org
Fri, 03 May 2002 19:02:42 -0400


"Bryan J. Smith" wrote:
> 
> On Fri, 2002-05-03 at 09:45, Patrick McGovern wrote:
> > I am trying to use the uuencode command to pass multiple files
> > to the mailx command, like this:
> > uuencode $PATH/file_name*.rpt   file_name*.rpt | mailx -s "files are
> > attached"  "$mail_address"
> > The uuencode command does not seem to allow the filename expansion.
> > Is there a way to send multiple files with uuencode?
> 
> When in doubt, yell "for" ...
> 
>   for i in `find . $PATH/file_name*.rpt`; do
>     uuencode ${i} ${i} >> file_all.rpt.uue
               ^^^^^^^^^
Would you please explain this (apparent) redundancy?  I'm a little slow
sometimes.

>   done
>   cat file_all.rpt.uue | mailx -s "files are attached" "$mail_address"
> 
> -- Bryan

Rinaldi
-- 
Aint Nobody's Business If You Do