In the event of word substitution, you might want to perform search and replace in 1 files of certain words and replace it with the desired words. Here’s the command that you can enter in Vi mode.
Example: – You might want to search and replace the word “bad” to “good” in the file. The substitution of the command will be like this: –
Some description of the command, %s will perform the search on the word “bad” and replace it with the word “good” and “g” represents global parameter which means the substitution will be on the entire file.
In the coming topic, I will share more on how to perform the search and replace in all the files without opening the files via Vi command using advance shell programming.
Next» Unzip Several Zip Files