Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!sri-unix!ctnews!pyramid!decwrl!nsc!nsta!instable!amos From: amos@instable.UUCP Newsgroups: comp.unix.questions Subject: Re: Why does this shell program run under csh???? Message-ID: <811@instable.UUCP> Date: Tue, 2-Jun-87 05:06:00 EDT Article-I.D.: instable.811 Posted: Tue Jun 2 05:06:00 1987 Date-Received: Thu, 4-Jun-87 04:15:15 EDT References: <243@kosman.UUCP> Reply-To: amos%nsta@nsc.com (Amos Shapir) Distribution: world Organization: National Semiconductor (Israel) Ltd. Home of the 32532 Lines: 19 Summary: The file's 1st char does it Hdate: 5 Sivan 5747 In article <243@kosman.UUCP> kevin@kosman.UUCP (Kevin O'Gorman) writes: (Trouble with 2 command files, one runs under /bin/sh and the other runs under /bin/csh). >The odd thing is that they are almost identical, the >exceptions being one argument to dump(8) and some commentary. ^^^^^^^^^^^^^^^ On most Unix systems and clones, if an executable file does not start with the proper magic word, /bin/sh is started to execute it. On old BSD-derived systems, if the file starts with a '#', csh is used instead; this was later expanded to define '#!' as a new magic word, indicating an interpreter to feed the file into for execution. Your file probably starts with a '#' comment; just adding a blank line before it should solve the problem. -- Amos Shapir National Semiconductor (Israel) 6 Maskit st. P.O.B. 3007, Herzlia 46104, Israel Tel. (972)52-522261 amos%nsta@nsc.com @{hplabs,pyramid,sun,decwrl} 34 48 E / 32 10 N