I have a script that facillitates NDM (Connect::\Direct) transfer to remote hosts. This script uses getopts to parse through the parameters passed to it and to set appropriate variables based upon what was passed in.
My issue arrises with the Kickoff variable. When I pass this to my ndm_shell getopts sets the value of the host script variable to "mv "
My question: Is there a way to pass a single variable that resolves to multiple arguments to getopts so that my internal variable contains the entire string?
The shell expanded variables once during the processing of the echo statement. It does not then loop to see if any new variable references were created.
If you want to expand a variable inside a variable, you need to use "eval echo".
As for your original question, you have multiple variables inside variables and it's not obvious to me when you want them expanded. One intrepretation would suggest that:
Kickoff="\"mv $PATH/$FILE1 $PATH/${FILE2}\""
might do the trick.