To perform a global search and replace in vi do:
:%s/search_string/replacement_string/g If you want to confirm each replacement add a “c” after the “g” at the end of the string. Tags: replace, search, vi Filed in vi with 0 Comments
:%s/search_string/replacement_string/g
If you want to confirm each replacement add a “c” after the “g” at the end of the string.
Tags: replace, search, vi