I'm trying to write a bash script that can pull variables from it's execution.
I really cannot explain this very well, but I want to get a variable from the same bash script.
Let's say in this instance that the script that I wrote is CMD.sh.
sh ./CMD.sh foobar
var = foobar
and if this is possible, how can I do this in a script?
sh ./CMD.sh foo bar fubar
var1 = foo
var2 = bar
var3 = fubar
how can I create a script a bash.sh script that can pull in the variable from the above and use it
CMD.shcall?