On Feb 26, 2014, at 7:59 AM, jet speed <speedj...@googlemail.com> wrote:
> > Chaps, > > Any quick one liner code in perl were i can get rid off the before and after > wwn each line for file as below > > file > ------- > device name lz_09_red_e10 vsan 200 > * fcid 0xef0013 [pwwn 50:00:00:00:99:00:66:7a] > * fcid 0xegg015 [pwwn 10:00:00:55:99:a8:d9:c4] [ pe-tgh10-hostb] > device name lz_09_blue_e10 vsan 200 > * fcid 0xef0013 [pwwn 50:00:00:00:99:00:66:7b] [ pe-tgh10-hostc] > * fcid 0xegg015 [pwwn 10:00:00:55:99:a8:d9:c9] > > > > desired output > --------------------- > > device name lz_09_red_e10 vsan 200 > 50:00:00:00:99:00:66:7a > 10:00:00:55:99:a8:d9:c4 > device name lz_09_blue_e10 vsan 200 > 50:00:00:00:99:00:66:7b > 10:00:00:55:99:a8:d9:c9 > Appreciate any help on this. s/.*\[pwwn (.*?)\].*/$1/; or the more specific s/.*\[pwwn ([0-9a-f:]+)\].*/$1/; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/