cc: [email protected]
Subject: Re: [uwin-users] typeset -H bug?
--------
> I sometimes need to get the windows style pathname (i.e. to put in a
> classpath v
> ariable for java on windows). I've been using typeset -H to translate a path
> suc
> h as '/C/...' to 'C:\...'
>
> But if the environment variable storing the pathname is inherited (either
> from t
> he windows system/user environment variables, or from a parent ksh) then
> using t
> ypeset -H on it seems to wipe out its value in the child ksh. If I return to
> the
> parent ksh, the value is still there. See below.
>
> $ export XVAR=/C/JDA
> $ echo $XVAR
> /C/JDA
> $ ksh
> $ echo $XVAR
> /C/JDA
> $ typeset -H XVAR
> $ echo $XVAR #blank line returned
>
> $ env |grep XVAR #appears to have disappeared from the environment
> $ exit
> $ echo $XVAR
> /C/JDA
>
> Pretty sure this didn't happen in UWIN 3.1 (last version I used extensively).
> If I execute the typeset -H prior to spawning a new ksh, I get an error.
> (This w
> as true in 3.1 as well)
>
> $ typeset -H XVAR
> $ echo $XVAR
> C:\JDA
> $ ksh
> ksh: :: invalid character in expression - C:\JDA
>
> Is there any way to work around this, other than re-exporting the relevant
> envir
> onment variables when I spawn a new ksh?
> Thanks,
> Sally
>
>
This was caused by a change to ksh93. I will restore the previous behavior
for the next ksh93 update in uwin. However, a workaround is to use
typeset -H XVAR=$XVAR
in the child shell. This should work in 3.1 as well.
David Korn
[email protected]
_______________________________________________
uwin-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/uwin-users