Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a couple of files that I need to update. I have to replace a token.

Search and replace is not realy an option here. The easiest way would be if I had an editor that can open a couple of files. If I would change the text in one of the files the changes would happen in all the opened files. Does such an editor exist?

share|improve this question

migrated from serverfault.com Jan 25 '11 at 4:37

This question came from our site for system and network administrators.

I think this quesion is better suited for superuser. –  Khaled Jan 24 '11 at 13:37
Why is "search and replace" not an option? As a sysadmin, (which you should be, if you're asking questions on this site), you'll want to get familiar with how to script such operations, often using tools like sed or Perl. –  mfinni Jan 24 '11 at 14:21

3 Answers 3

Yes... such an editor does exist try Notepad ++ ( http://notepad-plus-plus.org )

I use this for scripting and it allows multiple files to be opened and edited simultaniously - it works much like IE8 with opened tabs

Try it anyway

It'd give it 10/10

share|improve this answer
I can open a couple of files in it. But how can you edit them in one step? You still have to repeat the editing work dont't you? –  Anonymous Jan 24 '11 at 17:05
Hit Ctl-H to see the search-and-replace dialog, and you'll see a button to 'replace all', and another button to 'replace all in open documents.' –  mfinni Jan 24 '11 at 17:34

sed will do any sort of replacement you like in any files you like.

sed -i "s/foo/bar/g" baz.c
share|improve this answer

There are few workarounds:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.