I have a file that looks something 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
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 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
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.