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.
I noticed it by accident.
-------------------------------------------------------------------
andrus@and-lnv:/$ cd /
cd /
andrus@and-lnv:/$ cd //
cd //
andrus@and-lnv://$ pwd
pwd
//
andrus@and-lnv://$ cd /.//.
cd /.//.
andrus@and-lnv:/$ cd ..//
cd ..//
andrus@and-lnv:/$
andrus@and-lnv:/$ bash --version
bash --version
GNU bash, version 4.2.8(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
andrus@and-lnv:/$
-------------------------------------------------------------------
--
Andrey Demykin
QA Automated Test Engineer
email: andrey....@nexenta.com
skype: andr0423
Because POSIX says that implementations may (but not must) treat //
specially. And rather than special case just the implementations that
do treat it specially (such as cygwin), bash globally respects // on all
platforms even where it is not special.
>
> I found this in all version of the bash.
> Excuse me , if it is not a bug.
Not a bug.
--
Eric Blake ebl...@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
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