tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ Unix shells

Force use of sh ▻

Force use of sh

In article <7sef4d$8g0$1@nntp6.u.washington.edu>,
Donn Cave  <donn@u.washington.edu> wrote:
>- It could just issue an error message, e.g., "rc":
>  ; /tmp/bla
>  /tmp/bla: Exec format error

Just to expand on this slightly, it's actually a compile-time
configuration option what rc does when exec() fails.

In rc-1.4, the default behaviour was to feed the script to sh.

I changed this for rc-1.6.  The default is now to report the exec()
failure.  Why?  Well, in my environment---and I guessed many other
people's---it's far more common to encounter binaries from different
architectures than old scripts which don't have an explicit `#!' line.
I got fed up with seeing meaningless errors like "foo: syntax error at
line 1: `(' unexpected".

Tim.
--
Tim Goodwin   | "[ `static' ] is so overloaded in the C/C++ world that
Leicester, UK | I try to avoid it whenever I can't." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: Force use of sh
Date: 27 Sep 1999 13:01:40 +0100
Organization: University of Leicester, UK
Message-ID: <7snmbq$f2a$1@ltpcg.star.le.ac.uk>
References: <7sebh2$uqe$1@nnrp1.deja.com> <37E9DFAB.4950F2E4@Intraplan.de>
  <37EA06F3.6ADBA559@england.com> <7sef4d$8g0$1@nntp6.u.washington.edu>

△ comp.unix.shell △

◅ Unix shells

Force use of sh ▻