Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!lll-lcc!lll-tis!ames!hao!husc6!cmcl2!brl-adm!adm!rbj@icst-cmr.arpa From: rbj@icst-cmr.arpa Newsgroups: comp.unix.questions Subject: Why does this shell program run under csh???? Message-ID: <7710@brl-adm.ARPA> Date: Thu, 4-Jun-87 20:11:00 EDT Article-I.D.: brl-adm.7710 Posted: Thu Jun 4 20:11:00 1987 Date-Received: Sat, 6-Jun-87 11:07:39 EDT Sender: news@brl-adm.ARPA Lines: 26 Many implementations of csh stupidly then peek at the first character of the script and if it's "#" they assume it must be a csh script rather than an sh script. (That's a BUG. All my sh scripts but one start with "#".) I suspect you will get a lot of disagreement to that. I'm such you are aware of what I am about to say, but I'll state it anyway for those who don't and to make my reasoning clear. When csh was written, there was only one other shell around. It might have been presumptuous to proclaim itself *the* shell. So some method had to be found to distinguish one flavor of shell script from another. It would have been laughable to expect people to change all their existing scripts just so some grad student from a western university could distinguish input meant for his program rather than one written by several PhD's at an eastern public utility research lab. So he did the next best thing, and proclaimed that his program wouldn't run anything unless the first character was an octothorp, and would defer to his better educated predecessors' program instead. At that time, that venerable program he was trying to replace didn't know about hashes, it used colon's for comments. I suggest you do as well. (Root Boy) Jim Cottrell National Bureau of Standards Flamer's Hotline: (301) 975-5688