Search and Replace in VI

PREV     NEXT

In Unix file, we will be able to search the particular keyword and replace it with different keyword globally.

Ex:

->  :%s/search keyword/replacement keyword/g


In the above example the keyword Selvarasu will be replaced with Pachamuthu in the file. The keyword “g” used to search and replace globally. That means it will replace the keyword all over the file.

PREV     NEXT

Share this website !!!
Facebook Twitter Linkedin