Subject: Re: [ast-users] how to process '\\resource\dirname\file'
--------

> Hello Forum
> 
>  
> 
> I am using MKS Korn Shell on Win and need to process a string as an input 
> parame
> ter:
> 
> \\resource\dirname\file .
> 
>  
> 
> I actually have to copy files from there to another destination. I want 
> convert 
> this string into //resouce/dirman/file.
> 
> But value of this string is getting crumbled if assigned to positional 
> parameter
>  even before i get to conversion logic.
> 
> Do you have any advise?
> 
> Thank you,
>  
> Gene Golub
> 
> 

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 /.

If you are trying to convert a windows path into a UWIN path, then
        unixpath "$name"
will work.

If you are using UWIN, use the uwin-users group for discussion.

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

Reply via email to