What is a generalized way to create a bash script from another script.
For instance:
$./script1 arg1 arg2 > script2
$./script2
$arg1 arg2
I can think of a few ways like simply echoing the output but I was wondering if there was a better way or a command I didn't know about and a google search wasn't very helpful.
Thanks in advance for any and all help.