Skip to content

Find and replace in multiple files using emacs

I found a useful article that explains how one can use emacs to find/replace in several files at once:
http://xahlee.org/emacs/find_replace_inter.html.

1 thought on “Find and replace in multiple files using emacs”

  1. Sounds useful, thanks, I’ll take a look. Without it I’d normally use a perl one-liner:

    perl -p -i -e ‘s/pattern/replacement/g’ file1 file2 …

    (or “-i.bak” if you’re feeling a little more timid/sensible)

Leave a Reply

Your email address will not be published. Required fields are marked *