Re: [Exim] Shell trick help

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Michael F. Sprague
Fecha:  
A: Marc Perkel
Cc: exim-users
Asunto: Re: [Exim] Shell trick help
Marc Perkel <marc@???> 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.
>
> How do I do that?


I believe if you pipe the output (stream of IPs) to:

xargs -n 1 COMMAND

where COMMAND is your command that takes one IP as a parameter; you'll get
what you want.

mikeS

--
Michael Sprague  | mfs@???
Partner          | System and Network Engineering (SaNE), LLC
use STD::disclaimer;