Re: cygpath -u doesn't seem to convert spaces properly

2007-09-26 Thread Jerome Fong
Thanks, Jerome Williams, Gerald S (Jerry) wrote: Brian Dessent wrote: $ cd $ttt bash: cd: /cygdrive/c/Program: No such file or directory Yes, that's wrong. [...] It's got nothing to do with cygpath and everything to do with proper portable scripting practice. Quite true. When you're using

RE: cygpath -u doesn't seem to convert spaces properly

2007-09-26 Thread Williams, Gerald S (Jerry)
Brian Dessent wrote: >> $ cd $ttt >> bash: cd: /cygdrive/c/Program: No such file or directory > > Yes, that's wrong. [...] It's got nothing to do with > cygpath and everything to do with proper portable scripting practice. Quite true. When you're using bash or sh, you must *quote your arguments*

Re: cygpath -u doesn't seem to convert spaces properly

2007-09-25 Thread Brian Dessent
Jerome Fong wrote: > $ cd $ttt > bash: cd: /cygdrive/c/Program: No such file or directory Yes, that's wrong. But more importantly, it's not wrong just in the POSIX/Win32 path sense, it's wrong in the sense that it can't cope with any argument that contains whitespace. Your script would also fai

Re: cygpath -u doesn't seem to convert spaces properly

2007-09-25 Thread Jerome Fong
It seems to be a quoting problem. This is what I was doing: $ ttt="$(cygpath -u "$JAVA_HOME")" $ echo $ttt /cygdrive/c/Program Files/Java/jdk1.5.0_10 $ cd $ttt bash: cd: /cygdrive/c/Program: No such file or directory $ cd "$ttt" $pwd /cygdrive/c/Program Files/Java/jdk1.5.0_10 Is is possibl

Re: cygpath -u doesn't seem to convert spaces properly

2007-09-25 Thread Brian Dessent
Jerome Fong wrote: > I am trying to use cygpath -u to convert my windows path to an unix path > in my shell script. However, it has problems with paths that has spaces > in it. For example, "cygpath -u c:\Program Files\Java" is converted to > /cygdrive/c/Program Files/Java, which doesn't work.

RE: cygpath -u doesn't seem to convert spaces properly

2007-09-25 Thread Thrall, Bryan
Jerome Fong wrote on Tuesday, September 25, 2007 6:23 PM: > I am trying to use cygpath -u to convert my windows path to an unix > path in my shell script. However, it has problems with paths that > has spaces in it. For example, "cygpath -u c:\Program Files\Java" is > converted to /cygdrive/c/Pro

cygpath -u doesn't seem to convert spaces properly

2007-09-25 Thread Jerome Fong
I am trying to use cygpath -u to convert my windows path to an unix path in my shell script. However, it has problems with paths that has spaces in it. For example, "cygpath -u c:\Program Files\Java" is converted to /cygdrive/c/Program Files/Java, which doesn't work. Is there a flag that I am