Re: Mailing lists and subscribe
On Monday, March 10, 2008 at 23:25:30 +0100, Michelle Konzack wrote:
> Am 2008-03-09 17:58:02, schrieb Alain Bench:
>> the backtick expansion picks the first line only
> I have added the \ only for the mail...
Sorry I was not specific enough: Several \-ended lines in muttrc are
not the problem. The problem is that the backtick expansion picks only
the first line of the output of the enclosed command. Say you have 42
files in ~/Mail/lists/: The command prints 42 subscribe lines, but Mutt
will only ever see the first one. You are considered to be subscribed to
one single list.
>| `for LIST in ~/Mail/lists/* ; do echo -e "subscribe $(basename $LIST)" ;
>done`
So the above still doesn't work. Try this instead (for Mutt 1.4.x):
| unlists *
| subscribe `for LIST in ~/Mail/lists/*; do echo -n " $(basename $LIST)"; done`
Backticks can only deal with one line. To deal with multiple lines,
you need the "source" command, which can also run scripts|, but picks
all lines of their output.
Also note that this *seems* to work for Mutt 1.5.x, but due to
differences in the way patterns are matched, it would be guaranteed to
provide false positives. The script then should print strict regexps,
prepending \\ to dots, and solidly ^anchoring$ the addresses.
Bye! Alain.
--
When you want to reply to a mailing list, please avoid doing so with
Novell GroupWise. This lacks necessary references and breaks threads.