Code:
#!/usr/bin/perl
sub get_alldgs {
@alldg_list=();
@alldg_list=`/usr/sbin/vxdisk -o alldgs list 2> /dev/null`;
foreach $item (@alldg_list) {
my @f = split(" ", $item, 9999);
$alldg_device = $f[1];
$alldg_type = $f[2];
$alldg_disk = $f[3];
$alldg_group = $f[4];
$alldg_status = $f[5];
printf "%20s %10s %10s %10s %30s\n", $alldg_device, $alldg_type, $alldg_disk, $alldg_group, $alldg_status;
}
}
&get_alldgs
How do I get it to print all five columns?
Thanks.