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?