cd into // works?

Vladimir Grebenschikov vova at fbsd.ru
Tue Feb 22 20:44:57 GMT 2005


В вт, 22/02/2005 в 21:19 +0100, Andreas Kohn пишет:
>Hi,
>
>due to a typo, I typed
>
>[klamath] ~>cd //
>
>today. Okay, I'm used to the shell[1] changing any // into /, so I
>expected to get to /. Now, I got there, but pwd/$PWD still have "//" in
>them?
>
>[klamath] //>pwd
>//
>[klamath] //>echo $PWD
>//
>[klamath] //>cd //home//
>[klamath] //home>pwd
>//home
>
>I checked with Linux, and there everything works as expected:
>[catalina] ~>cd //
>[catalina] />pwd
>/
>
>Is this expected behavior? 

Looks like bash bug/feature

a) /bin/pwd instead of internal pwd for bash - show real path
b) try another shell sh or tcsh - both works as expected

>Regards,
>Andreas
>
>[1] I always thought it was the shell, but I have the same shell (bash 
>    3) on FreeBSD and Linux. 

Probably different version/build flags ?

-- 
Vladimir B. Grebenchikov
vova at fbsd.ru


More information about the freebsd-current mailing list