ksh prob cding into dir under dir with ":" in name (help)

ksh prob cding into dir under dir with ":" in name (help)

Post by James S. Ve » Sat, 11 Jan 1992 05:20:37



I'm getting strange behaviour from ksh which perhaps someone could
explain to me.

say I do the following

%cd /tmp
%mkdir a:b
%cd a:b
%mkdir z
%cd z

at that point ksh tells me:
        ksh: z:  not found

I've tried this on both Sun OS 4.1.1 and Sequent Dynix.  If I exec
another shell (sh, csh, tcsh) I can cd into z with no probs.

Any someone explain this to me?

[email appreciated, will summarize if desired]

--
James S. Vera      |         Internet           |Standard Disclaimers

+1.415.723.1089    |    FAX +1.415.725.7398     |vvv My WARNING vvv
I am an ASSU Graduate Senator, Engineering & Earth Sci.  Be Suspicious!

 
 
 

ksh prob cding into dir under dir with ":" in name (help)

Post by Dik T. Wint » Sat, 11 Jan 1992 09:02:30



 > I'm getting strange behaviour from ksh which perhaps someone could
 > explain to me.
Yes, that is serious brain damage!
 >
 > %cd /tmp
 > %mkdir a:b
 > %cd a:b
 > %mkdir z
 > %cd z
 > at that point ksh tells me:
 >   ksh: z:  not found
Try the following:
        cd a:b/z
works
        cd ..
puts you back in /tmp
But what gives an indication of what is happening
do in /tmp also:
        mkdir a a/z
        cd a:b
        cd z
and now you are in /tmp/a/z, not /tmp/a:b/z.

I just checked the source (11/16/88).  The reason is that ksh (before doing
the cd) constructs the absolute path of the directory where you are going to
cd to.  For this it uses a routine that is also used when building the
absolute pathname getting a choice of paths you give when setting CDPATH.
And guess what?  Yes, pathnames in CDPATH are colon separated.  Ksh ought
to distinguish more between cd'ing through CDPATH or directly.
--
dik t. winter, cwi, kruislaan 413, 1098 sj  amsterdam, nederland


 
 
 

ksh prob cding into dir under dir with ":" in name (help)

Post by Calvin Hayden x22 » Wed, 15 Jan 1992 02:35:06




>  > I'm getting strange behaviour from ksh which perhaps someone could
>  > explain to me.
> Yes, that is serious brain damage!

>  > %cd /tmp
>  > %mkdir a:b
>  > %cd a:b
>  > %mkdir z
>  > %cd z
>  > at that point ksh tells me:
>  >      ksh: z:  not found
> Try the following:
>    cd a:b/z
> works
>    cd ..
> puts you back in /tmp
> But what gives an indication of what is happening
> do in /tmp also:
>    mkdir a a/z
>    cd a:b
>    cd z
> and now you are in /tmp/a/z, not /tmp/a:b/z.

> I just checked the source (11/16/88).  The reason is that ksh (before doing
> the cd) constructs the absolute path of the directory where you are going to
> cd to.  For this it uses a routine that is also used when building the
> absolute pathname getting a choice of paths you give when setting CDPATH.
> And guess what?  Yes, pathnames in CDPATH are colon separated.  Ksh ought
> to distinguish more between cd'ing through CDPATH or directly.

I emailed Korn on this some time ago, and got a reply that he was aware
of this problem, and this is/was being fixed. We later grabbed a newer copy
of ksh (we currently have 11/16/88f), in which it was/is fixed.  Check to
see what rev you have, and get something newer (I think that 111688b was one
where we saw the problem, but maybe not).

Hope this helps.
--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  \  Calvin Hayden                   Uucp: ...!uunet!tijc02!cgh018    \

    ~~~~~~~~~~~~ My personal opinions and mine alone! ~~~~~~~~~~~~~~~~~~

 
 
 

ksh prob cding into dir under dir with ":" in name (help)

Post by Terry Gardn » Thu, 16 Jan 1992 12:46:34



Quote:>I emailed Korn on this some time ago, and got a reply that he was aware
>of this problem, and this is/was being fixed. We later grabbed a newer copy
>of ksh (we currently have 11/16/88f), in which it was/is fixed.  Check to
>see what rev you have, and get something newer (I think that 111688b was one
>where we saw the problem, but maybe not).

        Does this mean that a good test of whether or not one's
ksh is 88f is to try the test in this thread? Running what on
/bin/ksh on my system gives:

/bin/ksh:
         $Revision: 66.116.1.1 $
        Version 11/16/88

--

Senior Network Systems Programmer The Home Depot, Inc.
(404) 433-8211x5124