in reply to AIX harddisk sum of storage
Your script contains at least one typo in the ssh invocation. Where exactly are you having problems?
my $space = $SSH root\@$one for i in lspv | awk '{print \$1}'; do boo +tinfo -s \$i; done | awk '{sum+=\$1}END{print (sum\/1024)}'}'"`; # ^ here a backquote is missing print "$space\n";
My suggestion would be to first print out the command locally to see whether it looks like you intend to, or whether a dollar sign or backslash gets interpolated away.
I would move the summation to Perl instead of keeping it in awk, but that's more a stylistic issue.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: AIX harddisk sum of storage
by pjzero@90 (Novice) on Jul 23, 2018 at 17:32 UTC | |
by Corion (Patriarch) on Jul 23, 2018 at 17:56 UTC |