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?
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.