On Fri, Dec 9, 2011 at 1:22 AM, Daniel Melameth <dan...@melameth.com> wrote:
> While I realize this might not be the best forum for this, it is the
> ksh that is in base--and the official pdksh-5.2.14 has been abandoned
> since '99.  That said, I'm not too familiar with shell scripting, but
> I'm giving it a spin and am having some issues with typeset that I'd
> appreciate an appropriate clue stick with.
>
> $ cat temp
> typeset -L32 x="string1"
> y="string2"
> echo $x $y
>
> $ sh temp
> string1 string2
>
> As far as I understand it, the output should look like the following,
> but this is not the case:
>
> string1                          string2
>
> What am I missing here?  I am using typeset in a similar fashion in
> some while loops and it's working as expected, but the scenario above
> has me perplexed.
>
> Thanks.

A kind soul told me off list I simply needed quotes:

echo "$x $y"

Thanks.

Reply via email to