Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Sep 2001 01:04:06 +0200
From:      Alexander Langer <alex@big.endian.de>
To:        "David O'Brien" <obrien@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/etc rc
Message-ID:  <20010925010406.B540@fump.kawo2.rwth-aachen.de>
In-Reply-To: <20010924155433.A27017@dragon.nuxi.com>; from obrien@FreeBSD.org on Mon, Sep 24, 2001 at 03:54:33PM -0700
References:  <200109241817.f8OIHBM06001@freefall.freebsd.org> <20010924225049.A958@zerogravity.kawo2.rwth-aachen.d> <20010924155433.A27017@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thus spake David O'Brien (obrien@FreeBSD.org):

> > What about test(1)ing with -x if the file is executeable and then
> > call /bin/sh to execute it.  Seems to be the most logical behaviour
> > to me and satifies both revs.
> Huh?  What is different between ``./foo.sh'' and ``sh foo.sh'' when
> foo.sh is excutable?  The reason to use `ss' to run `foo.sh' is that
> foo.sh does not then need to be executeable.

I thought your problem was the missing interpreter (#!...)?
If you do [ -x foo.sh ] && /bin/sh foo.sh, it will only get
executed if the executeable flag is set, BUT will use the correct
interpreter.

Alex

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010925010406.B540>