* Gregor Zattler ([EMAIL PROTECTED]) [011218 03:44]: > Hi Peter, > hi mutt users, > * Peter Poeml <[EMAIL PROTECTED]> [Mon 10 Dez 2001 20:04:17 GMT]: > [...] > > As mentioned before, grepmail can jump in because mutt works on single > > mail boxes. Now I was curious and figured out the command for your real > > example: > > > > mutt -f <(grepmail -huqd "between 2001-09-01 and 2001-10-01" \ > > "^From.*frob@(foo|bar).net" mbox1 mbox2 mbox3) > > This seems cool but when i gave it a (much more simppler) try: > > mutt -f <(grepmail -h cco@ *) > > i see mutt reading messages from "/dev/fd/63", a few messages from > grepmaiol and then: > > the mutt index which first looks fine but when I hit <enter> to read a > message the pager was empty... > > also > > ae <(ls) > emacs <(ls) > jed <(ls) > > did not work. > > > Any hints?
Well, it won't help the bash-users out there, but anyone willing to give
zsh a try will benefit from this excerpt from the Process substitution
of the zshexpn manpage:
Both the /dev/fd and the named pipe implementation have
drawbacks. In the former case, some programmes may automatically
close the file descriptor in question before examining the file
on the command line, particularly if this is necessary for
security reasons such as when the pro� gramme is running setuid.
In the second case, if the programme does not actually open
the file, the subshell attempting to read from or write to the
pipe will (in a typical implementa� tion, different operating
systems may have different behaviour) block for ever and have to
be killed explicitly. In both cases, the shell actually supplies
the information using a pipe, so that programmes that expect to
lseek (see lseek(2)) on the file will not work.
...
If = is used, then the file passed as an argument will be the
name of a temporary file contain� ing the output of the list
process. This may be used instead of the < form for a program
that expects to lseek (see lseek(2)) on the input file.
So this works for me:
mutt -f =(mboxgrep -mmaildir '^From:.*callahan@homicide\.SFPD\.gov' $MAIL)
mboxgrep even adds the wicked ^From_ lines!
Really, though, zsh effectively does the same thing as what grepm does,
with the temp file.
Vineet
--
Satan laughs when # "I disapprove of what you say, but I will
we kill each other. # defend to the death your right to say it."
Peace is the only way. # --Beatrice Hall, The Friends of Voltaire, 1906
msg21763/pgp00000.pgp
Description: PGP signature
