ramya2005 has asked for the wisdom of the Perl Monks concerning the following question:
I need some information like the following for each encryption keys.show run Building configuration... ! encryption key 1 size 40bit 7 621AA6093A25 transmit-key encryption key 2 size 40bit 7 7260637E4720 encryption key 3 size 40bit 7 0F733F116035 encryption key 4 size 40bit 7 03B71F3D601D encryption mode wep mandatory !
Currently using the code below I able to extract text like "size 40bit 7 621AA6093A25 transmit-key", that is the one's following "encryption key x ".key : 1 size: 40 value: 621AA6093A25 (the length could be different) TransmitKey: true # The number 7 in the encryption key information should be ignored.
Please help me in extracting the required information Thanks!for ($Count=1; $Count<=4; $Count++) { if ($showrunOutput=~/encryption\skey\s$Count\s(.+)\s\n/){ print $1; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Extracting specific text info from the config file ouput
by philcrow (Priest) on Dec 16, 2005 at 21:41 UTC | |
|
Re: Extracting specific text info from the config file ouput
by InfiniteSilence (Curate) on Dec 16, 2005 at 21:45 UTC | |
by ramya2005 (Scribe) on Dec 16, 2005 at 23:16 UTC | |
by ramya2005 (Scribe) on Dec 20, 2005 at 00:10 UTC |