[Mailman-Users] Member list... (drifting off topic)
Mark Sapiro
msapiro at value.net
Fri Sep 29 16:01:25 CEST 2006
Anne Ramey wrote:
>>
>You might try
>/path/to/mailman/bin/list_members listname &> /path/to/mail -s 'List
>Names' box at address.com
This is shell dependent. &> doesn't work in all shells, but if it does,
the effect of the above would be to write both stdout and stderr from
the command
/path/to/mailman/bin/list_members listname -s 'List Names'
box at address.com
to the file /path/to/mail (with luck, this would fail for lack of
permission)
>You may need to specify the path to the mail depending on what you have
>PATH= set to for your crontab.
The OP reported he received mail, so I don't think the path is the
issue.
>Also, I've never tried to | in cron.
>I'm sure it's possible, but &> redirects the output of a cron command to
>wherever you've specified.
cron passes the command line to the selected shell. If the shell
recognizes | as a pipe it works.
In bash for example &> redirects both stdout and stderr to a file (not
to the stdin of a command), but in tcsh for example only >& does this,
and &> doesn't work at all.
To use &> in a cron command line, you'd need something like
/path/to/mailman/bin/list_members listname &> /tmp/xxx ; mail -s 'List
Names' box at address.com < /tmp/xxx ; rm /tmp/xxx
for the command part.
--
Mark Sapiro <msapiro at value.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users
mailing list