Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Adding Text to Each Match
- X-seq: zsh-users 9783
- From: Chris Johnson <cjohnson@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Adding Text to Each Match
- Date: Mon, 12 Dec 2005 10:39:46 -0500
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
Is there a non-loop way to replicate text for each filename matching a
pattern? For example, I'm trying to generate e-mail messages with
attachments that match a pattern to send with mutt. Each attachment
needs to be specified with the -a option.
echo body | mutt -a file1_foo -a file2_foo \
-s "Here's your foo" username
Is there something in zsh that would let me say
echo body | mutt [prefix all matches to *foo with -a] \
-s "Here's your foo" username
that would expand to the command listed above?
I think there's been some talk of this, but I don't know what to search
for in the archives. Thanks for your help!
--
Chris Johnson
cjohnson@xxxxxxxxxx
http://www.cs.utk.edu/~cjohnson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author