Code:
open VXDISK,"vxdisk -o alldgs list |" or die "unable to run vxdisk\n";
Using the above which works for the remainder of what I'm doing, however
I now need to make sure vxdisk doesn't read some disk groups, which
would work if I added
Code:
vxdisk -o alldgs list| grep -v rootdg | grep -v thisdg | grep -v thatdg |
But I cannot hard code the disk groups because this will run on different
servers with different groups that need to be excluded.
How can I disk groups to the line without hard coding? I can create a file
that contains the disk groups and open that file and add the contents to
an array like:
Code:
open(FILE,"dgfile");
while(<FILE>){
chomp $_;
push(@dg,"$_");
}
But how do I use it?
Code:
foreach my $diskgroup (@dg) {
$vx = `vxdisk -o alldgs list | grep -v $diskgroup`
That isn't going to work.
Thanks.