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

[no subject]



"Pathname canonicalization now leaves a leading `//' intact, as POSIX.1 
requires."

That's in the release notes for bash-2.01-release.

So it seems this was on purpose. In notes for newer releases there are 
number of allusions to adjustments to // behavior, so it seems that 
maybe this hasn't been a happy feature, but I think its definately a 
feature.

Looking harder, at the BASH FAQ this time, I see:

E10) Why does `cd //' leave $PWD as `//'?

POSIX.2, in its description of `cd', says that *three* or more leading
slashes may be replaced with a single slash when canonicalizing the
current working directory.

This is, I presume, for historical compatibility.  Certain versions of
Unix, and early network file systems, used paths of the form
//hostname/path to access `path' on server `hostname'.

So, there you go.

You can code around it as others have suggested, I guess.

Mike



Mike Murphy wrote:
> no, on bash 2.05b at least, if you type "cd //" and then do a pwd, it 
> says you are in "//", not "/", which is strange. I just tried pksh and 
> tscsh, and neither do that.
> 
> If you try "cd ///", that doesn't do anything wierd though, and puts you 
> in "/" as expected.
> 
> I've got to guess this is a bug of some sort. Google hasn't turned 
> anything up yet, so I'm endevouring to download the source and dust off 
> my c...
> 
> Mike
> 
> 
> Jason Vinson wrote:
> 
>> isn't that the same thing as cd /?
>>
>> at least that's what I see.
>>
>> Jason
>>
>>
>> On Mar 15, 2004, at 5:13 PM, Michael D. Hirsch wrote:
>>
>>> Quick!  What is the effect of "cd //"?  I sure guessed wrong.
>>>
>>> I don't really understand what is happening when I do that on RH 
>>> under bash.
>>> Can anyone explain this?
>>>
>>> Michael
>>> _______________________________________________
>>> Ale mailing list
>>> Ale at ale.org
&gt;&gt;&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; _______________________________________________
&gt;&gt; Ale mailing list
&gt;&gt; Ale at ale.org
&gt;&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt; 
&gt; 

-- 

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Mike Murphy
781 Inman Mews Drive Atlanta GA 30307
Landline: 404-653-1070
Mobile: 404-545-6234
Email: mike at tyderia.net
Email Pager: pagemike at tyderia.net
AIM: mmichael453
JDAM: 33:45:14.0584N  84:21:43.038W
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00543" href="msg00543.html">[ale] Quick LInux Quiz</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00529" href="msg00529.html">[ale] Quick LInux Quiz</a></strong>
<ul><li><em>From:</em> mhirsch at nubridges.com (Michael D. Hirsch)</li></ul></li>
<li><strong><a name="00530" href="msg00530.html">[ale] Quick LInux Quiz</a></strong>
<ul><li><em>From:</em> vinson.lists at charter.net (Jason Vinson)</li></ul></li>
<li><strong><a name="00531" href="msg00531.html">[ale] Quick LInux Quiz</a></strong>
<ul><li><em>From:</em> mike at tyderia.net (Mike Murphy)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00535.html">[ale] &quot;What's So Bad About Microsoft?&quot;</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00537.html">[ale] GPL Question.</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00531.html">[ale] Quick LInux Quiz</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00543.html">[ale] Quick LInux Quiz</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00536"><strong>Date</strong></a></li>
<li><a href="threads.html#00536"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>