Isn't that exactly what the xkcd covers?
Sometimes the work is "making the script beautiful and universal" and then you should indeed consult that xkcd.
Sometimes the work is spitting the commands you had to figure out anyways into a shell script in 5 seconds. Then it is a no brainer to do it, because it will safe you time even if you use it only once.