On 10/15/2013 06:57 AM, Martin Brugnara wrote:
> It seams that "cd [/]{1,}" should take you to the root node. (as showed up
> by 'ls')
> 
> But when we try with two "/" something goes wrong:
>    ls works as to be in the root node,
>    pwd report "//" as path instead of "/"
>    the bash line report "//" as path too

Not a bug. POSIX requires that "//" be implementation-defined, and
permits implementations where it is a different directory than "/".  At
least Cygwin behaves this way, using "//" as the root of the
"//system/share" path notation for accessing other computers on the same
network.  While Linux happens to have an implementation definition that
"//" and "/" are identical, bash has chosen that it is easier to always
handle "//" specially than to try to determine whether a particular
system treats it as distinct or normalizes it.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to