Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!cbosgd!cwruecmp!hal!ncoast!allbery From: allbery@ncoast.UUCP (Brandon Allbery) Newsgroups: comp.unix.questions Subject: Re: Why does this shell program run under csh???? Message-ID: <2619@ncoast.UUCP> Date: Wed, 10-Jun-87 21:30:42 EDT Article-I.D.: ncoast.2619 Posted: Wed Jun 10 21:30:42 1987 Date-Received: Sun, 21-Jun-87 08:04:26 EDT References: <243@kosman.UUCP> <1270@ssc-vax.UUCP> <5943@brl-smoke.ARPA> <5@zoo-hq.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.questions Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 29 As quoted from <5@zoo-hq.UUCP> by dhesi@zoo-hq.UUCP (Rahul Dhesi): +--------------- | 4.3BSD works very nicely with however many shells you have -- just make | sure each shell script begins with "#! /bin/sh" or "#! /bin/csh -f" etc. | System V chokes when it sees a csh script, because there is no uniform | mechanism to handle multiple shells (this based on what I see on my UNIX | PC and my Microport SVR2 systems). (It's supposed to work if you put a | ": use /bin/csh" line at the beginning of a script. It doesn't.) +--------------- That's because the intended interpreter of that line ignored it. Guess what? The intended interpreter is the person who runs it. (System V doesn't HAVE csh -- it has ksh. (Unless the VAR who sold it to you added it.) Ksh is sh compatible, so who cares?) Perhaps I should repost "bexec" again. (For those interested: it uses the "alias shell" feature in some (all?) csh's to implement execution of many unusual kinds of files. It (1) interprets #! lines (but does NOT implement setuid); (2) checks for binary files and invokes runcobol (RM/COBOL interpreter) on those; and (3) if all else fails, runs /bin/sh. I swear by it.) -- Copyright (C) 1987 Brandon S. Allbery. Redistribution permitted only if the redistributor permits further redistribution. ---- Moderator for comp.sources.misc ---- Brandon S. Allbery {decvax,cbosgd}!cwruecmp!ncoast!allbery aXcess Company {ames,mit-eddie,talcott}!necntc!ncoast!allbery 6615 Center St. #A1-105 necntc!ncoast!allbery@harvard.HARVARD.EDU Mentor, OH 44060-4101 +01 216 974 9210 (also eddie.MIT.EDU)