Friday, June 11, 2010

Vi search and replace command

Hi All,

To search and replace using Vi editor - issue this below command in "Insert" mode:

:%s/search_text/replace_text/g

where:

1. : is for Insert mode (Esc + i or Insert or shift i)
2. %s is for search
3. g is for Global search through the file.

Thanks & Regards,
Ananth S Gouri

No comments:

Post a Comment