[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:51082] Re: bsah で cd //
> 偶然 typo して気づいたのですが,bash で cd // とすると,
> $PWD が // となります.
> これは私だけ? そういう仕様? バグ?
> ご存知の方,居られますでしょうか?
> // ってどんな使い方があるか等あれば教えて頂けると幸いです.
bash の source の doc/FAQ もしくは、ftp://ftp.cwru.edu/pub/bash/FAQ
の E10) に、
========================================================================
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'.
========================================================================
とありますね。
吉田 充@横浜チーム.情報基盤センター.理化学研究所 (mitsuru@xxxxxxxxxxxxxxxx)