Sed is a stream editor.
Examples
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