procmail
[Top] [All Lists]

Re: just execute a shell command

1996-03-09 14:48:06
dummy(_at_)c2(_dot_)org (Robert) writes:
What's the best way to just execute a shell command in a procmail script?
I'd like to do this within a recipe.

Right now, I do:

:0:
*some condition
|cat > /dev/null; command to execute

Is there a better way?

:0 i:a_lockfile
* some condition
|command to execute

The 'i' flag tells procmail to not care that the command isn't reading its
standard input.  That allows you to leave out the "cat >/dev/null;" bit.
You need to specify the name of the local lockfile as neither
are you writing to a mailbox nor does the command contain ">>".


Philip Guenther

----------------------------------------------------------------
Philip Guenther                 UNIX Systems and Network Administrator
Internet: guenther(_at_)gac(_dot_)edu   Phonenet: (507) 933-7596
Gustavus Adolphus College       St. Peter, MN 56082-1498
Source code never lies (it just misleads).  (Programming by Purloined Letter?)

<Prev in Thread] Current Thread [Next in Thread>