How can I combine these lines (NOTE: this is just an excerpt from a much larger file):
interface GigabitEthernet0/0
no ip proxy-arp
interface GigabitEthernet0/0.202
no ip proxy-arp
interface GigabitEthernet0/0.358
no ip proxy-arp
interface FastEthernet0/0/1.26
no ip proxy-arp
interface GigabitEthernet0/0
no ip proxy-arp
interface GigabitEthernet0/0.202
no ip proxy-arp
interface GigabitEthernet0/0.358
no ip proxy-arp
interface FastEthernet0/0/1.26
no ip proxy-arp
interface Loopback0
no ip proxy-arp
interface Loopback1
no ip proxy-arp
interface Loopback26
no ip proxy-arp
interface GigabitEthernet0/0/0
no ip proxy-arp
so that they resemble this:
interface GigabitEthernet0/0 | no ip proxy-arp
interface GigabitEthernet0/0.202 | no ip proxy-arp
interface GigabitEthernet0/0.358 | no ip proxy-arp
interface FastEthernet0/0/1.26 | no ip proxy-arp
interface GigabitEthernet0/0 | no ip proxy-arp
interface GigabitEthernet0/0.202 | no ip proxy-arp
interface GigabitEthernet0/0.358 | no ip proxy-arp
interface FastEthernet0/0/1.26 | no ip proxy-arp
interface Loopback0 | no ip proxy-arp
interface Loopback1 | no ip proxy-arp
interface Loopback26 | no ip proxy-arp
interface GigabitEthernet0/0/0 | no ip proxy-arp
I've tried a few different solutions that I have found online, but none of them seem to work correctly for my situation
paste can do it:
Try this sed one-liner: