0

I am trying to edit my file using this sed command

sudo sed "s/192[^:]\+ /192.168.56.109/" file

The command outputs the complete file with correct change, but doesn't edit the file. If I open the file it is same as before.

Benjamin W.
  • 46,058
  • 19
  • 106
  • 116

1 Answers1

0

if inplace -i option is not working you can do this

sed "s/192[^:]\+ /192.168.56.109/" file > temp && mv temp file

make sure you have a backup though.

karakfa
  • 66,216
  • 7
  • 41
  • 56