-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/15/13 10:47 PM, Eric Blake wrote:
> 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.
The Posix specification of `cd' requires that the cd builtin only collapse
three or more leading slashes to a single slash.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html#tag_20_14

step 8c.


- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJeBP0ACgkQu1hp8GTqdKtaqACfeqBmvj4xUYDE3agybo3/gZS5
EbwAoIzXkG5RiVQsRKxQGaK7vbeGZ6kO
=uLkj
-----END PGP SIGNATURE-----

Reply via email to