change dir to //
Andre Robatino
robatino at fedoraproject.org
Sun Jan 16 23:34:39 UTC 2011
Michał Piotrowski <mkkp4x4 <at> gmail.com> writes:
>
> Hi,
>
> I wonder why such a thing is possible
> [michal <at> ozzy ~]$ cd /
> [michal <at> ozzy /]$ pwd
> /
> [michal <at> ozzy /]$ cd //
> [michal <at> ozzy //]$ pwd
> //
> [michal <at> ozzy //]$ cd ///
> [michal <at> ozzy /]$
>
> Why can I change dir to // ?
Good question - a directory listing shows it's in /, as expected, but $PWD is
wrong, and only when there are exactly 2 /'s. The same thing happens in F13,
F14, and Rawhide. It only happens in sh/bash, and not in csh/tcsh, ksh, or zsh.
More information about the test
mailing list