Re: cd into // works?

From: Vladimir Grebenschikov <vova_at_fbsd.ru>
Date: Tue, 22 Feb 2005 23:44:48 +0300
В вт, 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
Received on Tue Feb 22 2005 - 19:44:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:28 UTC