When you have one file in UNIX operating system that you want to change a string, you can use SED command to do so.
The SED command is used to make global changes to strings in UNIX files. For example, below we have a utility that will change all strings in a directory from one string to another.
Example, the string that you want to replace was from “/live/prod” to “/test/dev” so you have to execute the command as below: –
This command should be execute when you open the file using VI, and %s will perform a search and replace
This is sort of a “change all” utility within UNIX, although is not SED but the slang was quite the same as SED.
Double verify on the string that you replace before you perform any :wq! on the file
Next» Find, Search And Replace Files In UNIX