Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Could you please edit your question and show your desired output? My understanding is that you want to switch the ' to " and vice versa on all lines matching KEYWORD. However, as you can see from the answers below, others have understood something else. It would be clear if you showed your desired output. Commented Jan 13, 2017 at 22:57
  • Is it critical that a file is edited in place, i.e. without creating a copy? Typically, tools offering "in-place" edits actually write results to another file and then move it over the original one. Commented Jan 14, 2017 at 4:41
  • No, it's not critical that the file is edited in place. I can rename the copies if necessary. Commented Jan 16, 2017 at 18:20