procmail
[Top] [All Lists]

Re: playing specific sound

2002-12-04 17:20:05
On Wed, 4 Dec 2002, David W. Tamkin wrote:

DWT> |
DWT> | Any suggestions or hints ?
DWT>
DWT> With this TRAP assignment early in your rcfile,
DWT>
DWT>  TRAP='test -f "$LASTFOLDER.wav" && play "$LASTFOLDER.wav"'
DWT>
DWT> You'll get the sound played for a delivery to /path/to/folder whenever
DWT> /path/to/folder.wav exists.
DWT>
DWT>



How about (completely untested):

FROMHEADER=`formail -c -rtz -x To:`
DUMMY=`play "${FROMHEADER}.wav" > /dev/null`


so that a mail from mummy(_at_)example(_dot_)com with play the
"mummy(_at_)example(_dot_)com(_dot_)wav" file.

I'm not sure of the syntax of using test with a variable:

DUMMY=`test -f "${FROMHEADER}.wav" && play "${FROMHEADER}.wav" > /dev/null`

perhaps.


Alan

( Please do not email me AS WELL as replying to the list. Personal
  email is welcome but may invoke a password autoresponder. )


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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