How to search and replace from your shell and editor.

Read more at the source