These both worked for me:

  eval ./script.ksh -n 3 "${PARMS}";
  eval ./script.ksh -n 4 $PARMS;

On 14 October 2013 13:25, Cedric Blancher <[email protected]> wrote:
> On 14 October 2013 04:59, Tom K. <[email protected]> wrote:
>> Hey Gents,
>>
>> When trying to pass a variable of paramters to another script, to reduce
>> amount of code:
>>
>> OPT1="This is my Option";
>> OPT2="/folder/file";
>> PARMS="-u \"me\" -J \"$OPT1\" -g \"$OPT2\"";
>>
>> then passing it in like this:
>>
>> ./script.ksh -n 1 "$PARMS";
>>
>> I get this:
>>
>> UARG=| "me" -J "This is my Option" -g "/folder/file"|
>>
>> Or I get this:
>>
>> UARG=|"me"|
>>
>> when I try to pass it in this manner:
>>
>> ./script.ksh -n 2 ${PARMS};
>>
>> Looks like it manages to grab a part of what's in $PARMS but not the rest of
>> the string.  Was curious about this behaviour and if KSH had any way to make
>> this work?  Full code is below.  Tried a couple of variations including '
>> but no luck.  This is an older KSH93 version.  I don't have the option of
>> changing this version unfortunately.
>
>>
>> # echo ${.sh.version}
>> Version M 93t+ 2009-05-01
>
> Does read -C work in ksh93t+?
>
> if it does then you could pass complex data via compound variables,
> i.e. print compound variable via print -C and read the data into
> another shell instance through read -C.
>
> Ced
> --
> Cedric Blancher <[email protected]>
> Institute Pasteur
> _______________________________________________
> ast-users mailing list
> [email protected]
> http://lists.research.att.com/mailman/listinfo/ast-users



-- 
Regards

Danny
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to