I have a file that contains lines like this
proto udp
.
.
.
..
server 10.10.8.0/24 255.255.255.0
I need a way to remove only /24 from this line server 10.10.8.0/24 255.255.255.0 to become
server 10.10.8.0 255.255.255.0
considering that this line is variable but the only constant thing is the / it may be like this
server 198.196.178.0/8 255.0.0.0
so I need a way to remove only /8 from this line to become like this
server 198.196.178.0 255.0.0.0
sed '/^server/s|/[0-9]*||'
may be enough for your need.