cygpath -u doesn't seem to convert spaces properly
Wed Sep 26 00:39:00 GMT 2007
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 fail on a
Linux system that for example had a directory like "~/some files" -- and
in that case there is no 8.3 short filename hack to save you, so there
is no avoiding the need for proper quoting. It's got nothing to do with
cygpath and everything to do with proper portable scripting practice.
> Is is possible to setup the variable to not require the double quotes?
Only if you neglect to support filenames and paths with spaces in them.
> Since my other method doesn't require the double quotes, it would
> make the scripting much easier. I wouldn't need to keep track of which
> variables I had to double quote.
Easier perhaps but still broken.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin