1 #!/usr/bin/perl -w 2 use strict; 3 my $agent = "best1agent_start"; 4 my $collect = '/usr/bin/su - patrol /usr/adm/best1_default/bgs +/scripts/best1collect -q>>$LOG 2>>$LOG'; 5 open CF_FILES, "cf.files" or die "Error: $!"; 6 my @cf_files=<CF_FILES>; 7 #close CF_FILES; 8 foreach my $cf(@cf_files){ 9 my $line; 10 open (CF, "$cf") or die "ERRROR $!"; 11 while ($line = <CF>){ 12 if($line =~ /$agent/){ 13 print $line; 14 # $line = "$collect"; 15 # print $line; 16 } 17 } 18 }
In reply to Re^4: Logic Question
by wcj75019
in thread Logic Question
by wcj75019
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |