, lets say with file-tail, just use a RegEx.
While...{ if ($line =~ m/unreachable/){print "down!\n"};
...}
-Ursprüngliche Nachricht-
Von: Chas Owens [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 31. August 2007 15:21
An: Rodrigo Tavares
Cc: beginners@perl.org
Betreff: Re: Open
On 8/31/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm doing a script, it run a ping in many computers
> and create a log file.
>
> I need search in log file the word "Destination Host
> Unreachable". So, I have to take below line. After
> using regular expressions taking ferrari.
Hello,
I'm doing a script, it run a ping in many computers
and create a log file.
I need search in log file the word "Destination Host
Unreachable". So, I have to take below line. After
using regular expressions taking ferrari.lab and print
"The host is down !".
example:
PING ferrari.lab (192.