David, Cyrille, 

 ${name//\\//} coding seems to me the most elegant solution.

Code:

i=$1
i=${i//\\//} works perfect.

As far as -u in mks toolkit, here is what help says:

-u  

tells the shell to give an error message if an unset 
parameter is used in a substitution. 
David, I was using MKS Tools - korn shell port for 12 years already on NT. I 
evaluated previous version of Uwin and after it hanged few time running 
important script, I moved back to $500/license mks tools.




Thank you ,

 

Gene Golub




> Date: Wed, 17 Mar 2010 22:31:31 +0100
> From: [email protected]
> To: [email protected]
> Subject: Re: [ast-users] how to process '\\resource\dirname\file'
> CC: [email protected]
> 
> 
> David Korn a écrit :
> > 
> > I don't know much about the MKS version of ksh, but if you download
> > and run UWIN, then  if you can input the parameter with
> >     read -r name
> > to preserve the \'s.
> > 
> > Then        "${name//'\'/'/'}" should change the \'s to /.
> 
> how about to add something like the -U option or some sort of
> combinations like -tH or -uH to typeset to do the unixpath
> translation ? this may help portability across systems...
> uwin needs unixpath, cygwin cygpath -u, others ${name//\\//},
> etc.
> 
> Regards,
> 
> Cyrille Lefevre
> -- 
> mailto:[email protected]
> 
> 
> 
> _______________________________________________
> ast-users mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-users
                                          
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to