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.
  • 38,596
  • 16
  • 96
  • 104

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
  • 64,710
  • 7
  • 38
  • 55