I have the following problem: I want to change the netmask of large number of ip adresses in Debian's /etc/network/interfaces
because I am going to expand the network. After changing it I will use screen ifdown ens18 && ifup ens18
to apply the changes. The substitution of the netmask works in my example, the problem is that I need to keep the 26 unchanged in the ip address. I have a sed
line which changes all twenty-sixes to 25 but of course this is not what I want.
I have:
iface ens18 inet static
address 195.26.153.26/26
I want:
iface ens18 inet static
address 195.26.153.26/25
How can I achieve this?