To locate and replace a string of text in a file using use the below text.
shell# vi filename
Once in vi use the following:
:%s/string/new-string/ <enter>
That will replace any instance of string with new-string.
To locate and replace a string of text in a file using use the below text.
shell# vi filename
Once in vi use the following:
:%s/string/new-string/ <enter>
That will replace any instance of string with new-string.