Hello David
Thank you for advise. Frank Rohoi helped me already. It turned out I had to use 'print -r' to properly source it into sed statement. Here is what I do: print -r $1|sed 's/\\/\//g'> c:/de1/316/t2 Variable assignment like: A=`print -r $1|sed 's/\\/\//g'` Produced error: 'New line of end of file found in pattern'. So output it to file. Is there any way to use assignment variable and avoid using output file in this code? Thank you, Gene Golub > Date: Wed, 17 Mar 2010 11:12:23 -0400 > From: [email protected] > To: [email protected] > Subject: Re: [ast-users] how to process '\\resource\dirname\file' > > 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
_______________________________________________ ast-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/ast-users
