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

migration rejected from serverfault.com Aug 14 at 1:24

This question came from our site for system and network administrators. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Steven, fixer1234, ncdownpat, Scott, Windos Aug 14 at 1:24

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – Steven, fixer1234, ncdownpat, Scott, Windos
If this question can be reworded to fit the rules in the help center, please edit the question.

    
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

2 Answers 2

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

sed -i "s/foo/bar/g" baz.c
share

You may try:

share

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