Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!seismo!hao!hplabs!sri-unix!buck@nrl-css From: buck%nrl-css@sri-unix.UUCP Newsgroups: net.unix Subject: csh misconceptions Message-ID: <16950@sri-arpa.UUCP> Date: Sat, 25-Feb-84 22:13:28 EST Article-I.D.: sri-arpa.16950 Posted: Sat Feb 25 22:13:28 1984 Date-Received: Fri, 2-Mar-84 15:06:53 EST Lines: 22 From: Joe BuckThere's been a good deal of misinformation on this list about csh and the "#!" construction. First off, 4.xbsd uses sh, not csh, to execute all shell scripts UNLESS the first line is "#! /bin/csh". Therefore a first line of "#! /bin/sh" is not necessary. Second, originally a line starting with a colon was a comment, so sh on some systems does not consider "#" a comment character. Therefore the suggestion that all users include #!/bin/sh in their shell scripts is not only unnecessary for portability, but counterproductive. By the way, on Berkeley systems, any program, not just sh and csh, may be specified in the first line with "#!". There are some restrictions though; the full pathname must be given and the command must be less than 32 characters. There are other restrictions also. This feature is in the kernel, not the shells. The whole file, including the first line, is the input for the command, so the command must treat "#" as a comment character. -Joe