Posted By

moonbather on 10/01/10


Tagged

replace vi sed find


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

williamsOwen


Vi find and replace in


 / Published in: Bash
 

URL: http://www.felixgers.de/teaching/emacs/vi_search_replace.html

  1. First occurrence on current line: :s/OLD/NEW
  2.  
  3. Globally (all) on current line: :s/OLD/NEW/g
  4.  
  5. Between two lines #,#: :#,#s/OLD/NEW/g
  6.  
  7. Every occurrence in file: :%s/OLD/NEW/g

Report this snippet  

You need to login to post a comment.