Mark Pearl

Sed is a stream editor.


Replace old with new globally in filename.txt and output it to the screen

sed 's/old/new/g' filename.txt 

Replace old with new golablly inf filename.txt and overwrite the original file

sed -i 's/old/new/g' filename.txt

-i #=> used to edit in place on the file


Getting started with Sed

blog comments powered by Disqus

Want to get my personal insights on what I learn as I learn it? Subscribe now!