Sed is a powerful command to work with string & text in Linux. Here is sed command to replace string in file.
replace string
How to Find & Replace String in VI Editor
Sometimes you may need to find & replace string in VI Editor. Here is how to substitute strings & patterns in VI Editor.