how to search search & delete line in vi editor

the below command in vi editor will remove the whole line that contains the word “search-keywords” on the entire file.

:g/search-keywords/d

Related posts:

  1. Linux/Unix Search and Replace Text from Multiple Files In Linux/Unix, for newbie to do search text from multiple...
  2. sed with multiple criteria sed -e 1d -e 50d -e ‘/junks/d’ would remove first...
  3. PostgreSQL Database psql Command Line Query Sometime psql command line query can be useful when it...
  4. Error in suphp.c on line Am experimenting suphp on several servers for security reason. During...
  5. windows 2000 – command line (cmd) command auto completion By default, windows 2k server does not activate this function....
  6. How to Set VI or VIM Tab Space By default, vi or vim editor tab space is 8...
  7. vim – search & replace was searching what is the escape sequence for tab &...
  8. postgresql82-server compile error on Apple Leopard with Macports 1.5 I wasn’t able to compile postgresql82-server on my machine, it’s...

Leave a Reply