Hi Marc,
tail -f logfile | grep webpage | gawk ` { print $1 } ` | xargs blockip
$1 can be changed to what ever argument u want from the incoming pipe
xargs will pass any command line fed arguments as arguments to the new
command
----- Original Message -----
From: "Marc Perkel" <marc@???>
To: <exim-users@???>
Sent: Wednesday, January 07, 2004 1:31 PM
Subject: [Exim] Sed Regex help
> I'm a little slow that this so I can use the help of someone smarter
> than me.
>
> I'm needing to write a script so that if someone hits a specific web
> page - it locks out their IP address. I have part of it written. So this
> should be simple. The IP address is the first field in the lines that
> I'm looking at.
>
> So I'm going to run:
>
> tail -f logfile|grep webpage| something | blockip <the ip address>
>
> So - the "something" has to cut out the IP address for the lines coming
> through and run blockip with the ip adress as the parameter.
>
> I have a hacker problem and I think I can trap him with this.
>
> So - thanks in advance for your help.
>
>
>
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at
http://www.exim.org/ ##
>
>