This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: BUG: Invalid assumption about file paths beginning with '\'


On Tue, Oct 10, 2000 at 09:28:47AM -0400, Norman Vine wrote:
>Earnie Boyd writes:
>
>>Well, as Chris corrected, the current 1.1.4 release does allow the \
>reference
>>to refer to the root of the current device.  I just tested this and it does
>>indeed work this way.
>
>Yes, however this feature may not always yield the 'expected' result.
>
>NHV:/f> mkdir foo
>NHV:/f> cd foo
>NHV:/f/foo> touch jnk
>NHV:/f/foo> ls \foo
>ls: foo: No such file or directory
>NHV:/f/foo> ls
>jnk
>NHV:/f/foo> touch foo
>NHV:/f/foo> ls \foo
>foo
>NHV:/f/foo> ls
>foo  jnk
>NHV:/f/foo> cd \
>> bash: syntax error: unexpected end of file
>NHV:/f/foo> cd ../
>NHV:/f> cd \foo
>NHV:/f/foo> cd ..
>NHV:/f> cd \foo
>NHV:/f/foo> cd \foo
>bash: cd: foo: No such file or directory

It is not clear from this context, but hopefully you know that \ is a
special character in bash.  I think a one line statement of that fact
might have been more useful than the above 20 lines of "What's he trying
to say?"

So, just to be perfectly clear, you have to either double the \ character
in bash or quote it if you want a program to see it.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]