Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a search and replace tool that takes a list of rules and either a file (or directory) and runs those rules on the files. I have a bunch of different things that need to be changed in many files, and I'd like to be able to run all the rules in one shot.

I was hoping I could put the rules separate file, and use the same set of rules over and over again.

Does such a tool exist?

share|improve this question
up vote 2 down vote accepted

I found out I was looking for sed. Using that with the -f option should do most of what I want. is a good place to get started with the sed command.

share|improve this answer

This tool does much more than what you're looking of, but can easily handle multiple rules:

share|improve this answer
does something like this exist that is free or OSS? It's not for personal use. :\ – Joe Mar 12 '10 at 22:52

Wheater you want to add some simple rules, save them for later or add regexp multiline replacements BK ReplaceEm is for you ;-). But seriously. If you just want to quickly run some simple, specific modifications then this will probably not be the best of tools. But if you want to save the rules and not wonder every time how to do some conversion then this will work. I also like it because you can (but don't have to) save a folder and a file mask for which you will run replacements. You can also move the set of folders between replacement groups and run replacements in certain order.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .