SyntaxFix
Write A Post
Hire A Developer
Questions
You may also use the ed command to do in-file search and replace:
ed
# delete all lines matching foobar ed -s test.txt <<< $'g/foobar/d\nw'
See more in "Editing files via scripts with ed".