I sometimes need to get the windows style pathname (i.e. to put in a classpath 
variable for java on windows). I've been using typeset -H to translate a path 
such as '/C/...' to 'C:\...'  

But if the environment variable storing the pathname is inherited (either from 
the windows system/user environment variables, or from a parent ksh) then using 
typeset -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 
was 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 
environment variables when I spawn a new ksh?
Thanks,
Sally



_______________________________________________
uwin-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/uwin-users

Reply via email to