In this answer, the person describes a method using multiple steps in the shell, including setting a variable. I was thinking it would be useful to show a shell script that takes a parameter, instead of using the variable and a command that probably would have to be copied and pasted each time because of its complexity.

Would it be better to simply edit the answer to add a shell script, or should I create a new answer using the information given in the answer and turned into a shell script, saying that it was based on the other answer?

share
add comment

2 Answers 2

up vote 11 down vote accepted

It would be better for you to create you own, separate answer, and reference the other, which is perfectly okay.

share
add comment

Make sure the answer can stand on it's own, which in your case it does. Nice job on the answer :)

When not to reference another answer-

  • The change is small, ex. one wrong variable.Then an edit would be better.
  • The "answer" is a critique or criticism of another answer, ex. "All the other answers get it wrong, this is the right answer", If a answer is wrong about something, edit or leave a comment, so the information can be corrected.
  • You can't tell which answer is being talked about, and there is not enough explanation of how to use your answer. ex. "Use this instead of above..." (since posts move around)
share
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .