Here is an example of find and replace with VI, this will replace every instance of the “findthistext” string in the file with “replacewithtext”. Neat saves lots of typing!
:%s/findthistext/replacewithtext/g
Here is an example of find and replace with VI, this will replace every instance of the “findthistext” string in the file with “replacewithtext”. Neat saves lots of typing!
:%s/findthistext/replacewithtext/g
Find and replace with VI on a pathname is a bit tricky you ned to use escape characters.
In this case /bin/mail should be replaced with /usr/bin/mail
The command below would do it:
:%s/\/bin\/mail/\/usr\/bin\/mail/g