VI search and replace command examples

VI search and replace command examples

Let us say you would like to find a word called “foo” and replace with “bar”.
First hit [Esc] key
Type : (colon) followed by %s/foo/bar/ and hit [Enter] key.
:%s/foo/bar/

Comments

Popular posts from this blog

Centos 7 Setup Webmin, Virtualmin, Usermin, CSF Firewall and Letsencrypt

Setting Up Out-of-Office Messages in Outlook

How to install Openbox