Quote:
Originally Posted by eliote
that didn't work crts!
maybe you could help me more interactively...
have you got yahoo ID?!
|
it works if you enter, e.g.
192.168.1.10/24
or
192.168.1.10/35
at the read prompt.
BTW, it is the slash that was messing up the previous sed statement. That is why we changed the delimiter.
If you want to add /24 statically then try
Code:
sed -ri "/^ip address=/ s|[0-9].*[0-9]|$newip/24|" file