In bash if you cd to // your pwd will be //, but if you cd to / or ///+ your pwd will be /. Is there a reason for this or is it just a weird bug?
I have tried this in osx and ubuntu.
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
From the Bash FAQ:
| |||||||||||
feedback
|
|
Though the answer was correct on the data it gave, it didn't quite answer the question asked. The shell is normalizing the path. It does:
You can verify this with strace, which will see what is actually passed into the syscall
The shell does the path normalization before it even tells the system to change the dir | |||
|
feedback
|