in reply to Re: Spaces in folder names...
in thread Spaces in folder names...
It has nothing to do with the shell. Despite an origin in csh, glob patterns are system independent*. Space is special to glob. It indicates a separation of patterns. For example, glob('*.h *.c') will return all C source and C header files.
Surrounding the pattern in quotes will fail. Quotes aren't special to glob. The space can be escaped using "\". However, it's simpler to just call bsd_glob. bsd_glob is the function that implements glob, but it doesn't treat spaces specially when it's called directly.
* — Almost. IIRC, "\" is treated literally in Windows when it isn't followed by a special character. This doesn't matter here.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Spaces in folder names...
by swampyankee (Parson) on Oct 14, 2009 at 20:45 UTC |