Re: [Exim] Shell trick help

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Tony Finch
Data:  
Para: Marc Perkel
CC: Exim users list
Assunto: Re: [Exim] Shell trick help
On Tue, 27 Jul 2004, Marc Perkel wrote:

> OK - I'm running tail on exim logs and extracting IP addresses that
> match a specific criteria. So I have a stream of raw IP addresses coming
> in that I want to pipe into a program that takes each IP address and
> runs a command with the IP address as the parameter.


What I often do is something like

tail -f mainlog | sed '/.* H=[^[]*[[]\([^]]*\).*/!d;s//ping -c 1 \1/' | sh

Tony.
--
f.a.n.finch <dot@???> http://dotat.at/
BERWICK ON TWEED TO WHITBY: WEST OR SOUTHWEST 2 OR 3 INCREASING 3 OR 4. FAIR.
GOOD. SLIGHT OR SMOOTH.