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.
iface ens18 inet static address 126.96.36.199/26
iface ens18 inet static address 188.8.131.52/25
How can I achieve this?