1

I want to insert specific line (XXX) in specific place (new line after b) in example.txt. When I do:

$ sed '/b/a XXX' example.txt
a
b
XXX
c

It seems to work, but the original remains file unchanged.

$ cat example.txt 
a
b
c

How to change example.txt by SED permanently ?

okt
  • 175
  • 1
  • 5
  • 9

0 Answers0