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

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
kevin
  • 95

1 Answers1

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

daisy
  • 54,555