It's a KSH problems.
I have encounter some problems with variables and quotation marks today. Order doesn't matter, although i cannot read the scripts but only execute it.
SomeScripts.sh "First=Harvey Lo","Third=Rebecca Won","Second=laugh at"
Results:
Harvey Lo laugh at Rebecca Won
but If i try to put it in a ksh scripts file, it doesn't work:
#!/bin/ksh
SOMEVAR=\"First=Harvey Lo\",\"Third=Rebecca Won\",\"Second=laugh at\"
SomeScripts.sh ${SOMEVAR}
Results:
Error: No. of ARGS > 3
I even try the following, but still not work.
#!/bin/ksh
SOMEVAR=\"First=Harvey Lo\",\"Third=Rebecca Won\",\"Second=laugh at\"
SomeScripts.sh `echo ${SOMEVAR}`
Results:
Error: No. of ARGS > 3
can anyone help, all i know that there is some java inside the SomeScripts.sh, the actual function have more than 20 parameters, but i have simplified as shown.
The Original Help File:
SomeScripts.sh First=Harvey,Third=Rebecca,Second=laugh
Harvey laugh Rebecca