Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!ut-ngp!infotel!pollux!bobkat!m5 From: m5@bobkat.UUCP (Mike McNally ) Newsgroups: comp.unix.wizards Subject: Re: symbolic links and csh execution Message-ID: <1177@bobkat.UUCP> Date: Wed, 24-Jun-87 10:45:58 EDT Article-I.D.: bobkat.1177 Posted: Wed Jun 24 10:45:58 1987 Date-Received: Fri, 26-Jun-87 06:32:15 EDT References: > <2211@bunker.UUCP> <1097@mtune.ATT.COM> Reply-To: m5@bobkat.UUCP (Mike McNally (Man from Mars)) Organization: Digital Lynx, Inc; Dallas, TX Lines: 48 In article <1097@mtune.ATT.COM> jhc@mtune.UUCP (Jonathan Clark) writes: >Listen guys, if I say 'cd a/b/c/d/e;cd ..' then I am now in a/b/c/d, >regardless of how many symlinks or networked file systems I had to go >through to get there. Anything else is brain-damaged. Well gee, if I cd to somewhere and then cd to .., I expect my current directory to be changed to the parent of the previous wd. I have never been confused by this, and I'm amazed at the amount of people who are. > >On a similar note, for the people who are expounding starting one's >shell scripts with "#! /bin/csh", the logical continuation of this is >to start one's C programs with "#! /bin/cc", and so on. Wow, on my system I have to compile my C programs. This process results in an executable file with (guess what) a magic number at the beginning. > Writing a >language processor which is a partial superset of an existing standard >is one thing, and quite OK in my book; hacking the kernel to support this >automagically is quite another. The kernel supports *any* interpreter. I can start a makefile with #!/bin/make and that will work; I can start an awk script with #!/bin/awk and that will work; I can put #!sort at the top of a file, change its mode, then run it to see the sorted contents. And of course, I can start a C sourcefile with #!/bin/cc and then run it to invoke the compiler (which will complain about the illegal preprocessor command, I think). The #! "hack" was not just for csh. > Perhaps csh should have been made to >interpret a strict superset of the Bourne shell, so that normal scripts >work under it, and then csh scripts should have been interpreted via >"csh script"? Then we wouldn't have this problem. Please. There is more to running programs than what is typed from a shell. What about other programs that want to run somthing via execve? Are they supposed to figure out what interpreter to use by calling "file"??? >Jonathan Clark >[NAC,attmail]!mtune!jhc -- Mike McNally, mercifully employed at Digital Lynx --- Where Plano Road the Mighty Flood of Forest Lane doth meet, And Garland fair, whose perfumed air flows soft about my feet... uucp: {texsun,killer,infotel}!pollux!bobkat!m5 (214) 238-7474