ddrew78 has asked for the wisdom of the Perl Monks concerning the following question:
What I need to do is decrement the last octet of each IP address by one, so it looks like this:address-family ipv4 vrf V1234:ABCD neighbor 192.168.254.2 route-map something in neighbor 192.168.254.2 route-map something out address-family ipv4 vrf V8765:ZYXW neighbor 192.168.254.6 route-map something in neighbor 192.168.254.6 route-map something out address-family ipv4 vrf V0918:AZBY neighbor 192.168.254.10 route-map something in neighbor 192.168.254.10 route-map something out
I have tried several variations with 'sed', but can't get anywhere. Any ideas?address-family ipv4 vrf V1234:ABCD neighbor 192.168.254.1 route-map something in neighbor 192.168.254.1 route-map something out address-family ipv4 vrf V8765:ZYXW neighbor 192.168.254.5 route-map something in neighbor 192.168.254.5 route-map something out address-family ipv4 vrf V0918:AZBY neighbor 192.168.254.9 route-map something in neighbor 192.168.254.9 route-map something out
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: decrementing numbers
by almut (Canon) on Mar 05, 2010 at 15:23 UTC | |
by JavaFan (Canon) on Mar 05, 2010 at 17:24 UTC | |
|
Re: decrementing numbers
by MidLifeXis (Monsignor) on Mar 05, 2010 at 18:04 UTC | |
by almut (Canon) on Mar 05, 2010 at 18:54 UTC | |
by ddrew78 (Beadle) on Mar 05, 2010 at 20:23 UTC | |
by almut (Canon) on Mar 05, 2010 at 20:47 UTC | |
|
Re: decrementing numbers
by jwkrahn (Abbot) on Mar 05, 2010 at 18:57 UTC | |
|
Re: decrementing numbers
by Anonymous Monk on Mar 05, 2010 at 15:16 UTC |