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
In reply to decrementing numbers by ddrew78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |