Unless I missed something, only one person mentioned "eval" and then seemed to dismiss it almost immediately.
I think that's a pity because it's just these sorts of problems that "eval" is designed for.
The following two scriptettes demonstrate: --------- script -------------- #!/bin/sh PARMS='p1 p2 --command "this is a command" p5' eval ./daemon $PARMS ------- end script ------------ --------- daemon -------------- #!/bin/sh declare -i PN=1 for PARM in "$@" do echo "parameter $PN = "$PARM"" PN=PN+1 done ------- end daemon ------------
Gives:
parameter 1 = "p1" parameter 2 = "p2" parameter 3 = "--command" parameter 4 = "this is a command" parameter 5 = "p5"
which is what was wanted wasn't it?
I probably missed something as I'm seriously advanced in the senility stakes.
Regards
Andrew Wallis