ddrew78 has asked for the wisdom of the Perl Monks concerning the following question:
what I'm trying to do is find each line that begins with 'ip address' and copy it directly below, so it looks like this:ip vrf forwarding ABC:Defgh ip address 1.1.1.1 255.255.255.252 ip vrf forwarding ABD: Efghi ip address 2.2.2.2 255.255.255.252
I've been searching the web over, but all everybody wants to do is get rid of duplicates. Any ideas? And no, this is not homework, this is a script I'm trying to write to run in our network...I hav the rest of it done, but can't seem to be able to duplicate those lines. Any help is greatly appreciated.ip vrf forwarding ABC:Defgh ip address 1.1.1.1 255.255.255.252 ip address 1.1.1.1 255.255.255.252 ip vrf forwarding ABD: Efghi ip address 2.2.2.2 255.255.255.252 ip address 2.2.2.2 255.255.255.252
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to duplicate lines
by jwkrahn (Abbot) on Mar 03, 2010 at 22:17 UTC | |
by ddrew78 (Beadle) on Mar 03, 2010 at 23:30 UTC | |
by lidden (Curate) on Mar 04, 2010 at 01:28 UTC | |
|
Re: How to duplicate lines
by jrsimmon (Hermit) on Mar 03, 2010 at 22:23 UTC | |
|
Re: How to duplicate lines
by BrowserUk (Patriarch) on Mar 03, 2010 at 22:32 UTC | |
|
Re: How to duplicate lines
by ungalnanban (Pilgrim) on Mar 04, 2010 at 04:49 UTC | |
|
Re: How to duplicate lines
by bichonfrise74 (Vicar) on Mar 04, 2010 at 00:06 UTC | |
by ddrew78 (Beadle) on Mar 05, 2010 at 13:13 UTC |