Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!cbosgd!cwruecmp!hal!ncoast!robertd From: robertd@ncoast.UUCP (Rob DeMarco) Newsgroups: comp.unix.questions Subject: Re: Why does this shell program run under csh???? Message-ID: <2613@ncoast.UUCP> Date: Wed, 10-Jun-87 16:38:13 EDT Article-I.D.: ncoast.2613 Posted: Wed Jun 10 16:38:13 1987 Date-Received: Sun, 21-Jun-87 08:02:14 EDT References: <243@kosman.UUCP> Reply-To: robertd@ncoast.UUCP (Rob DeMarco) Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 34 (You will problibly get a lot of mail on this subject so I will try to be brief) You say that the one shell script with comments in it wount except the read command. Here's your problem. When typing in a file that is a shell script the system defaults to running /bin/sh on it. (At least on ncoast it does) Well, if you are running csh and type in a command that is a shell script then the system will run /bin/sh. BUT if the first, and I mean FIRST line of your file is a comment , (beginning with "#") then it will run /bin/csh on it!!!! So, stick a blank line as the first line of your file and you should be ok. [> Rd -- [=====================================] [ Rob DeMarco ] [ UUCP:decvax!cwruecmp!ncoast!robertd ] [ ] [ "I hate 'Wheel of fortune'....and ] [ proud of it!!" ] [=====================================]