I want to search and replace string located in a several files via bash console.
Here is the command I use to find a string in a file:
grep "string" * -r
so the above is for searching, now I need a command to replace the string.
Is that even possible?
http://www.grymoire.com/Unix/Sed.html
It’s cranky and difficult, but it’s one way to do it.
Here’s an example:
This replaces ugly with beautiful in sue.txt.