#!/usr/bin/perl -w use strict; my @vxvols = `/usr/sbin/vxprint -htqg rootdg`; foreach my $type (@vxvols) { if ( $type =~ /pl/ ) { print ($type) ; } } pl Flars-01 Flars ENABLED ACTIVE 20982912 RAID 3/32 + RW pl Flars-02 Flars ENABLED LOG 10176 CONCAT - + RW pl backup-01 backup ENABLED ACTIVE 33560448 CONCAT - + RW pl backup-02 backup ENABLED ACTIVE 33560448 CONCAT - + RW pl backup-03 backup ENABLED ACTIVE LOGONLY CONCAT - + RW pl export_install-01 export_install ENABLED ACTIVE 209727360 RAID 3/32 + RW pl export_install-02 export_install ENABLED LOG 10176 CONCAT - + RW pl rootdisk7vol-01 rootdisk7vol ENABLED ACTIVE 213696 CONCAT - + RW pl rootdisk7vol-02 rootdisk7vol ENABLED ACTIVE 213696 CONCAT - + RW pl rootvol-01 rootvol ENABLED ACTIVE 63427008 CONCAT - + RW pl rootvol-02 rootvol ENABLED ACTIVE 63427008 CONCAT - + RW pl rootvol-03 rootvol ENABLED ACTIVE LOGONLY CONCAT - + RW pl runbook-01 runbook ENABLED ACTIVE 2116608 RAID 3/32 + RW pl runbook-02 runbook ENABLED LOG 10176 CONCAT - + RW pl swapvol-01 swapvol ENABLED ACTIVE 33550272 CONCAT - + RW pl swapvol-02 swapvol ENABLED ACTIVE 33550272 CONCAT - + RW pl var-01 var ENABLED ACTIVE 12587712 CONCAT - + RW pl var-02 var ENABLED ACTIVE 12587712 CONCAT - + RW pl var-03 var ENABLED ACTIVE LOGONLY CONCAT - + RW
In reply to Regex matching and setting variables by linebacker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |