more csh path

ras at rayssd.UUCP ras at rayssd.UUCP
Fri Mar 9 03:22:22 AEST 1984


A while back, (on 4.1 BSD csh) I noticed a rather peculiar
phenomenon with the "cd" command and C shell variables;

If you happen to have a non-accesible directory by the name of one of
the variables, (such as "path", "cdpath", "home", etc.) in your current
directory, and you try and "cd" into it, you will actually end up in
the directory specified in the variable, for example:

% mkdir path
% chmod 007 path
% set path = ( /usr/local/bin $path )
% cd path
/usr/local/bin
% pwd
/usr/local/bin

This also happens on a non-existent directory, and does print
the directory that you landed in (a la cdpath).

I never bothered to find where this was going wrong, or if it was
just another feature, but was wondering if the same thing exists
in 4.2BSD.
-- 
Ralph Shaw,		{allegra, decvax!brunix, ccieng5}!rayssd!ras
Raytheon Co,		 Submarine Signal Div., Portsmouth, RI



More information about the Comp.unix mailing list