On Unix, Linux, and OS X systems, the sed (stream editor) utility can be used to modify the contents of a file replacing one string, i.e., sequence of characters, with another. E.g., suppose the file named
myfile
contains the following
lines:pink blue red Blue orange blue purple blue blue
If I want to replace all occurrences of the word "blue" with "green", I could issue the following sed command at a Bash shell prompt.
$ sed -i -e 's/blue/green/g' myfile
[ More Info ]