Help with Perl script

Dave Martini martini1 at llnl.gov
Tue Mar 24 22:10:34 UTC 2009


I'd like to run a command called metastat and have it search its output
for the word Ok but what I have so far doesn't work. Anyone have any 
suggestions?
Thanks much.
Dave.


#!/bin/perl
$target = "Ok";
open(INPUT, "<'metastat'");
while (<INPUT>) {
         if (/$target/) {
                 print  "Found $target\n";
}
}
close(INPUT);




More information about the redhat-list mailing list