From owner-freebsd-security Mon Jan 17 12:23: 7 2000 Delivered-To: freebsd-security@freebsd.org Received: from pluto.psn.net (pluto.psn.net [207.211.58.12]) by hub.freebsd.org (Postfix) with ESMTP id 7D4F914E37 for ; Mon, 17 Jan 2000 12:22:59 -0800 (PST) (envelope-from will@shadow.blackdawn.com) Received: from 21-048.008.popsite.net ([209.69.197.48] helo=shadow.blackdawn.com) by pluto.psn.net with esmtp (PSN Internet Service 3.12 #1) id 12AIfY-0003Br-00; Mon, 17 Jan 2000 13:22:34 -0700 Received: by shadow.blackdawn.com (Postfix, from userid 1000) id 77A111976; Mon, 17 Jan 2000 15:22:18 -0500 (EST) Date: Mon, 17 Jan 2000 15:22:18 -0500 From: Will Andrews To: scarr Cc: Alexander Langer , Jonathan Fortin , FreeBSD Security Subject: Re: sh? Message-ID: <20000117152218.C34178@shadow.blackdawn.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from scarr@ineocom.com on Mon, Jan 17, 2000 at 02:39:53PM -0500 X-Operating-System: FreeBSD 3.4-STABLE i386 Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, Jan 17, 2000 at 02:39:53PM -0500, scarr wrote: > > I think this is mostly because /bin/sh is known to always be there, no > matter what unix-like system you're using. I know when I'm writing a > shell script that needs to be ultimately portable I use /bin/sh (as > painful as it may be). If you're going to write a shell script in bash or > ksh you're gambling on the fact that they system in question has it > installed. > > Of course, there could be other factors. Does anyone know if sh is used > for these types of things for any other reason than portability? Performance. sh(1) is the smallest, and therefore quickest, of all well-known shells. There are smaller shells, but they are not well known, and most do not support nearly as much as sh(1). --Will To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message