in reply to Re: Trying to sort output
in thread Trying to sort output
I have as well, and for completeness, will post it here also.
#!/usr/bin/perl use strict; use warnings; use List::Util qw(max); my $rundsm = `dsmadmc -id=reports -pa=reports q proc`; my @seconds = $rundsm =~ /\((\d+)\s+seconds\)/mg; if (max(@seconds) >= 1001) { print "Message: Issue Found, Alert Operations\n", "Statistic: 1\n"; exit 1; } else { print "Message: No Issues Foun\n", "Statistic: 0\n"; exit 0; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Trying to sort output
by Kenosis (Priest) on Feb 24, 2013 at 01:08 UTC |
In Section
Seekers of Perl Wisdom