1

need to replace < network> with a "192.168.61.0/24" but i am not able to do it with sed,

tried

 sed -i s/"< network>"/"192.168.61.0/24"/g file.sh

but this is not working

0
8

Use another separator, i.e #

sed -i s#"< network>"#"192.168.61.0/24"#g file.sh

Or escape /

sed -i s/"< network>"#"192.168.61.0\/24"/g file.sh

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.