"cd path" strangeness

Jay Mathew Libove jl42+ at andrew.cmu.edu
Tue Jun 14 03:53:02 AEST 1988


I tried Chip Salzenberger's "cd path" command on Berkeley Unix 4.3 and
on CMU Mach 4.3, and got the same strangeness he described;
So, I looked at "man csh" and found:
(reproduced without permission from csh.1, CMU mach 4.3)

>cd
>cd name
>chdir
>chdir name
> Change the shell's working directory to directory "name".
> If no argument is given then change to the home directory of
> the user.
> If "name" is not found as a subdirectory of the current directory
> (and does not begin with `/', `./' or `../'), then each component
> of the variable "cdpath" is checked to see if it has a subdirectory
> "name". Finally, if all else fails but "name" is a shell variable
> whose value begins with `/', then this is tried to see if it is a
> directory.

That last item, "if all else fails but "name" is a shell variable"...
Well, most of us have "path" set to something beginning with a /
right? There you go....

This is NOT a bug :-)

Jay Libove
Arpa:   Jay.Libove at andrew.cmu.edu	Bitnet: Jay.Libove at drycas.bitnet
UUCP:   ...!{uunet, ucbvax, harvard}!andrew.cmu.edu!Jay.Libove
UUCP:   ...!{pitt | bellcore} !darth!libove!libove



More information about the Comp.unix.xenix mailing list