now, the code I've written thus far:Pseudo name=hdiskpower97 Symmetrix ID=000187751303 Logical device ID=0380 state=alive; policy=SymmOpt; priority=0; queued-IOs=0 ====================================================================== +======== ---------------- Host --------------- - Stor - -- I/O Path - -- S +tats --- ### HW Path I/O Paths Interf. Mode State Q-IO +s Errors ====================================================================== +======== 0 fscsi0 hdisk100 FA 10cA active alive +0 0 2 fscsi2 hdisk254 FA 7cA active alive +0 0 Pseudo name=hdiskpower90 Symmetrix ID=000187751303 Logical device ID=0381 state=alive; policy=SymmOpt; priority=0; queued-IOs=0 ====================================================================== +======== ---------------- Host --------------- - Stor - -- I/O Path - -- S +tats --- ### HW Path I/O Paths Interf. Mode State Q-IO +s Errors ====================================================================== +======== 2 fscsi2 hdisk247 FA 7cA active alive +0 0 0 fscsi0 hdisk93 FA 10cA active alive +0 0
ok, so i'd expect it to fill $1 and $2 up with my groupings and print out just those two fields but $2 is unitialized and if I just print $1 it seems to be going back and forth between my groupings.. clearly I'm missing something basic about how this works. any advice?#!/usr/bin/perl -w use strict; use warnings; my @filelist = <usc*.devs>; foreach my $file (@filelist) { open(FH,$file) or die "cant open $file: $!"; while(<FH>) { if(/^.*Pseudo.*?\=(.*?$)/ .. /^.*Logical.*?\=(.{4})/sg) { print "$1,$2\n; } } close(FH); }
In reply to help printing items across multiple lines by exsnafu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |