Re: attach multiple files from command line
On 2007-03-21, Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx> wrote:
> On Wednesday, March 21 at 09:00 PM, quoth Eric Smith:
> >You could get funky with zsh viz.
> >
> >files=( _chile_2007_*{626..631}*jpg _chile_2007_*{643,766,769}*JPG
> >some_textfile_if_you_like.txt );
> >mutt joe@xxxxxxxxxx {-a,$^files} -s "Fotos attached"
> >
> >Which is the zsh way to make an array and then interpolate the -a
>
> Heh, not a bad thought. Here's the bash way to do the same thing:
>
> files=( *.jpg *.JPG some_textfile.txt )
> mutt joe@xxxxxxxxxx "${files[@]//#/-a }" -s "Fotos attached"
Or in one line like this:
mutt joe@xxxxxxxxxx $(set *.jpg *.JPG; echo ${*/#/-a }) -s "Fotos attached"
Regards,
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Mobile Broadband Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA