in reply to Re: Failboat -- An Emotionally Disturbed Tool For Checking NetBackup Client Coverage
in thread Failboat -- An Emotionally Disturbed Tool For Checking NetBackup Client Coverage

That is your problem with it, Really?

How about using Perl to do that, since we are doing this in a Perl program:

open my $PIPE, '-|', "/usr/openv/netbackup/bin/admincmd/bpcatlist -cli +ent $client 2>&1" or die "Cannot open pipe from 'bpcatlist' $!"; while ( <$PIPE> ) { next unless /$client/; $lastValidBackupTime = ( split )[ 1 ]; last; } close $PIPE or warn $! ? "Error closing 'bpcatlist' pipe: $!" : "Exit status $? from 'bpcatlist'";
  • Comment on Re^2: Failboat -- An Emotionally Disturbed Tool For Checking NetBackup Client Coverage
  • Download Code

Replies are listed 'Best First'.
Re^3: Failboat -- An Emotionally Disturbed Tool For Checking NetBackup Client Coverage
by jffry (Hermit) on Mar 19, 2010 at 16:11 UTC

    jwkrahn wrote:

    >That is your problem with it, Really?

    Yes. I did not go through the trouble to respond for the sake of sarcasm. It was a sincere response.

    Besides, I suspected someone more clever and skilled at Perl such as you would respond with appropriate Perl syntax, and I was still able to spread the message of usless use of grep.

    So it looks like a win-win situation to me.

      (Sorry, been posting Anonymously..deh)

      I could have done it in straight Perl, but it's kind of clumsy and elaborate by comparrison, considering i'm not really doing anything but invoking an external command.