I have 30 linux servers that I need to change subnetmask. I want to use a simple script or a simple command to change the subnemt mask from 255.255.255.128 to 255.255.255.0 in ifcfg-eth0.
can someone please help?
Thanks,
Elad.
bashcentoslinuxscriptingsed
I have 30 linux servers that I need to change subnetmask. I want to use a simple script or a simple command to change the subnemt mask from 255.255.255.128 to 255.255.255.0 in ifcfg-eth0.
can someone please help?
Thanks,
Elad.
Best Answer
A simple
sed
command like this will do it:You can combine this
sed
command with SSH command to execute this on each server using the a command like: