Thanks Jim and Paul, Appreciate your inputs. Sj.
On Wed, Feb 26, 2014 at 4:47 PM, Paul Johnson <p...@pjcj.net> wrote: > On Wed, Feb 26, 2014 at 03:59:40PM +0000, jet speed 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] > > perl -ne 'print /\b((?:[a-f0-9]{2}:){7}[a-f0-9]{2})\b/ ? "$1\n" : $_' < > file > > You should probably try and understand it before trusting it. > > -- > Paul Johnson - p...@pjcj.net > http://www.pjcj.net >