Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!samsung!uunet!icom!xwkg.Icom.Com!andy From: andy@xwkg.Icom.Com (Andrew H. Marrinson) Newsgroups: comp.unix.shell Subject: Re: the #! notation Message-ID: Date: 28 Jan 91 05:34:47 GMT References: <1991Jan16.162705.580@cid.aes.doe.CA> <2950@sixhub.UUCP> Sender: news@icom.icom.com (News Feed) Distribution: na Organization: Icom Systems, Inc. Lines: 25 davidsen@sixhub.UUCP (Wm E. Davidsen Jr) writes: > It seems to me >there's a mechanism in SysV which put a line like > : uses /bin/csh >as the first line, but I can't remember where I saw it. Just to clear up a common misconception here. I know of no shell that allows anything resembling ``: use some_program'' to specify an arbitrary interpreter like the #! syntax does. The idea that this works seems to have come from Larry Wall's configure script, which checks to see if #!/bin/sh arranges for scripts to be executed by Bourne shell, and if that fails, checks : use /bin/sh. The latter is used because some older cshs (especially on system V and similar Unixes that lack #!) treat scripts beginning with # as csh scripts while scripts beginning with any other character are executed with /bin/sh. It is the ``:'' that is significant in this case. The phrase ``use /bin/sh'' is just a comment. -- Andrew H. Marrinson Icom Systems, Inc. Wheeling, IL, USA (andy@icom.icom.com)