procmail
[Top] [All Lists]

Re: passing information to script

2008-01-12 15:17:29
N.J. Mann wrote:
In message <4788D9BA(_dot_)2050104(_at_)fro(_dot_)se>,
        Markus Edholm (markus(_dot_)edholm(_at_)fro(_dot_)se) wrote:
LuKreme wrote:
On 11-Jan-2008, at 23:58, Markus Edholm wrote:
I cant figure out how to grab first http://blah and run my script
something like this should match the first http in your body, I think (untested)

:0
* B ?? http://\/[^ ]+
{ URL="http://$MATCH"; }


.procmailrc:

:0
* B ?? http://\/[^ ]+
{ URL="http://$MATCH"; }
|/root/scripts/dump.sh "$URL" >> /home/markus/dump.txt

No, no, no... :-)   What you tried is not valid, as procmail told you.
LuKreme's suggestion was correct, but he left you to "adjust" it for
your own environment.

Try this (untested!):

:0
* B ?? http://\/[^ ]+
|/root/scripts/dump.sh "http://$MATCH"; >> /home/markus/dump.txt


Cheers,
       Nick.

Thanks both
I will take a good look in this

/Markus

Attachment: signature.asc
Description: OpenPGP digital signature

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
<Prev in Thread] Current Thread [Next in Thread>