getcwd() and friends.

Leo de Wit leo at philmds.UUCP
Sat Apr 8 19:10:29 AEST 1989


In article <2001 at unisoft.UUCP> greywolf at unisoft.UUCP (The Grey Wolf) writes:
       []
|# 
|# P.S.  Given that directories are chdir-able iff they are marked 
|# executable, why do sh/csh/et.al. require that you type "cd"??
|# Just execute the directory by chdir-ing to it!
|
|At the College of Marin, some friends of mine (and later myself) modified the
|4.1 c shell (Yeah, I *know* it's not everyone's favourite, but it IS mine!
|(no accounting for taste?)) to do just that.  I later incorporated the 
|modification into the 4.3 csh.  It depended upon a variable called "autogoto".
|
|bit of trivia
|my roommate (a main writer of dsh) prefers not to use this feature,
|since it has stung him too many times.  He administers a system on which such
|users as "ls" exist, for example.  He's in the main users directory, and types
|"ls" and receives nothing but a prompt.  Imagine his initial shock --
|"OH NO!  WHERE ARE ALL THE USERS' DIRECTORIES!!!???"...)

Seems this system administrator has his PATH wrong. What if I, for example,

    $ ln -s /etc/shutdown /tmp/ls

and he types 'ls' in /tmp?

	 Leo.



More information about the Comp.unix.wizards mailing list