I answered to first replacement of a string in a file using sed and it was marked as possible duplicate. Then I looked at How to use sed to replace only the first occurrence in a file? (the original question) and thought that my answer can be helpful there, even though the question has an already accepted answer. Should I copy my answer to the original question? Would it be better to wait the possible duplicate to be closed?
What is meta?
- Any Stack Exchange user can ask a question
- The community provides support, votes on ideas, and reports bugs
- Your voice helps shape the way Stack Exchange operates
If your answer is valid for the original, I would copy it as well. Maybe it's better than the accepted one. Closed question does not have the answers migrated.
Rather than simply copying the answer, I would rather rephrase it and, if possible, add some more details. This is what I would do also in the case there are two questions to which I could answer with the same answer, even in the case the answer adds details that are not necessary for the second question.