bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why bash command "cd //" set path "//" ?


From: Bob Proulx
Subject: Re: Why bash command "cd //" set path "//" ?
Date: Fri, 26 Aug 2011 11:54:18 -0600
User-agent: Mutt/1.5.21 (2010-09-15)

Andrey Demykin wrote:
> Why bash command "cd //" set path "//" ?
> 
> double slashes only in first position 
> 
> I found this in all version of the bash.
> Excuse me , if it is not a bug.
> Possibly it is a feature.

It is a feature.  In the old days of the Apollo OS two leading slashes
identified a network path.  In the consolidation of operating system
feature sets that feature was preserved and is still possible
depending upon the system.  It is allowed but not required.  Your
system may not use the feature but others do.  More recently Cygwin is
making good use of it in the Cygwin environment for the same purpose.

Therefore the standards say that two leading slashes are significant
and are handled specially.  It might be a network path.  But three or
more leading slashes are not significant and anywhere else in the path
multiple slashes are not significant.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]