Hi everyone,
I have not touched Perl in the last 4 years, my books are at work and I have something here I'm struggling to figure out. From a known list of servers, I need to gather up how many clearcase views are on each server and then only choose the one that has the least number of views that given day. This is what I have so far.
my @servers = qw (
srv30bld4
srv30bld5
srv40bld2
srv40bld3
srv40bld4
);
foreach (@servers) {
my @view = `$CT lsview -short -host $_ | wc -l`;
I'm running the clearcase command "lsview" on each server and doing a wc so I know just how many views came back. The result I get is as follows.
srv30bld4 92
srv30bld5 0
srv40bld2 58
srv40bld3 3
srv40bld4 2
So now I know how many clearcase views are on each server but I only want the one with the lowest amount. I'm having difficulty sorting this list. Any help is appreciated.
Thanks.
I have not touched Perl in the last 4 years, my books are at work and I have something here I'm struggling to figure out. From a known list of servers, I need to gather up how many clearcase views are on each server and then only choose the one that has the least number of views that given day. This is what I have so far.
my @servers = qw (
srv30bld4
srv30bld5
srv40bld2
srv40bld3
srv40bld4
);
foreach (@servers) {
my @view = `$CT lsview -short -host $_ | wc -l`;
I'm running the clearcase command "lsview" on each server and doing a wc so I know just how many views came back. The result I get is as follows.
srv30bld4 92
srv30bld5 0
srv40bld2 58
srv40bld3 3
srv40bld4 2
So now I know how many clearcase views are on each server but I only want the one with the lowest amount. I'm having difficulty sorting this list. Any help is appreciated.
Thanks.
Comment