Tim's Blog

Search and replace across multiple files (linux)

I usually use perl -pi or sed to replace strings in multiple source code files. Today I found out about ‘rpl’

sudo apt-get install rpl

rpl will let you search and replace across multple files without having to remember perl -pi syntax etc.

rpl -R -x .html “Foo” “Bar” *

The -x option specifies a file extention to process, -R tells it to work recursively


To Tumblr, Love PixelUnion