[TriLUG] cd //
Jeremy Portzer
jeremyp at pobox.com
Fri Jan 23 14:50:14 EST 2004
On Fri, 2004-01-23 at 14:42, Ron Joffe wrote:
> I got a quickie question for those of you in the know.
>
> By mistake one of my clients did a cd /$ORACLE_HOME where
> ORACLE_HOME = /opt/oracle.
>
> The resultant is that their prompt showed:
>
> server_name://opt/oracle>
>
> So I played around a bit with it, and it seems that you can prepend the
> extra / easily.
>
> The question is does this have any significance ? I did notice that this seems
> to be bash shell specific, i.e. the behavior is not found in ksh or csh.
That's pretty interesting; it seems like a bash bug to me. I don't
think it would matter, as consecutive slashes are always condensed to a
single slash when a file is being opened, etc, but it's still odd. I
noticed it only does this with exactly two slashes, and that it also
shows up in the output of 'pwd' :
jeremy at jeremy ~ $ cd /var
jeremy at jeremy /var $ cd //var
jeremy at jeremy //var $ pwd
//var
jeremy at jeremy //var $ cd ///var
jeremy at jeremy /var $ cd ////var
jeremy at jeremy /var $ rpm -q bash
bash-2.05b-34
jeremy at jeremy /var $ cat /etc/redhat-release
Fedora Core release 1 (Yarrow)
--Jeremy, a little curious too.
--
/---------------------------------------------------------------------\
| Jeremy Portzer jeremyp at pobox.com trilug.org/~jeremy |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F E135 6F9F F7BC CC1A 7B92 |
\---------------------------------------------------------------------/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20040123/f7e7d6c4/attachment.pgp>
More information about the TriLUG
mailing list