Replace All Instances of a String With Sed
Sed, a stream editor is very powerful and can be used to quickly replace all occurrences of a string within a string or file. Read intro to sed to get up to speed. This type of replacement is useful to quickly refactor or simply rename items in a large codebase right in the terminal.
First, you define the type of file you want to search for the target file in. Then you take those files found and search for a target string and set the string you want to replace the target file with.
If the strings have slashes in them be sure to escape them!
For convenience you can make this into a bash alias which we’ve talked about in bashrc for terminal
Read more about it here. This guide is a good tutorial as well.