Honored Contributor Honored Contributor
Re: shell to perl script
1) I do not have 'opcragt' available so I don't know exactly what the output would look like.
Provide a good/bad example for better help.

2) You may want to use the -all option and parse the output against a pre-read node list.

Check out: http://perlmeme.org/faqs/system/system.html

Anyway... 1) could be done using something like:

# perl x.pl < node-list.txt >> node-not-available.txt
where (untested) ...
-- x.pl --
use strict;
use warnings;
while (my $node = <>) {
chomp $node;
for (qx(opcragt $node)) {
if (/HPOM/) {
print qq($node\n);
last;
}
}
}

Hope this help some,
Hein