From owner-freebsd-current Mon Oct 26 17:22:42 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA19410 for freebsd-current-outgoing; Mon, 26 Oct 1998 17:22:42 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from picnic.mat.net (picnic.mat.net [206.246.122.117]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA19399 for ; Mon, 26 Oct 1998 17:22:37 -0800 (PST) (envelope-from chuckr@mat.net) Received: from localhost (chuckr@localhost) by picnic.mat.net (8.9.1/8.8.5) with ESMTP id UAA03245; Mon, 26 Oct 1998 20:21:02 -0500 (EST) Date: Mon, 26 Oct 1998 20:21:02 -0500 (EST) From: Chuck Robey To: "Kurt D. Zeilenga" cc: current@FreeBSD.ORG Subject: Re: Changing sh for compatibility sake In-Reply-To: <3.0.5.32.19981026163758.009dd550@localhost> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 26 Oct 1998, Kurt D. Zeilenga wrote: > FreeBSD sh is not the lowest common denominator. I'm sorry, that's not true. Ask anyone who writes shell scripts that install software (or perform any necessarily portable function) across multiple platforms. sh is the shell to use ONLY BECAUSE it's the lowest common denominator. Why else would they use the dumbest shell? People use sh because it's the most likely to be universally available. It may seem strange, but it's certainly true, and if you write your scripts using sh, they'll just work anywhere (stepping over the problem of a badly written script ab initio). Please understand, I'm not talking user shells, I'm talking sysadmin and installer type shells, which means sh, and only sh. No 2nd choice. Have you ever seen an installer script written by a company that *didn't* supply the entire OS, be written in any shell BUT sh? > Neither is bash. > Neither is pdsh. Neither is ksh or whatever your favorite shell is. > They are all factors of the lowest common denominator. That's true of user shells, it's NOT TRUE for sh, which is unique. All the other shells (including the one I like) are for us users; sh is for sysadmins and installer-writers. You don't think I use sh, do you? I use tcsh, which I wouldn't dream of suggesting be used to replace sh. Likewise bash (which is a great shell), likewise scsh, etc. The only reason I saw for putting forward pdksh was because it boasted 100% sh compatibility, it IS being actively developed (new versions still coming out with bug-fixes), and it's smaller (as far as static image) than sh. I was never, ever referring to it's larger, non-compatible-to-sh extensions. If they didn't come without changing the sh compatibility, they weren't worth it. Extra features are a distraction here, and shouldn't be part of the discussion. The point isn't choosing a user shell, it's choosing *sh*, which IS UNIQUE, and must remain so. We use ash now for sh (no, we don't use the original sh code, that's AT&T code). > > Changing FreeBSD sh to something else will: > 1) not improve the portability of existing scripts. In fact, > the change can only decrease portability of existing scripts. > > 2) not change the lowest common denominator for script > developers. That is, FreeBSD sh will still be in use and, > hence, will still be a factor. Even if the target is > just FreeBSD, both old and new shells would be factors. > This change can only add new factors to the lowest > common denominator. but sh *is* the lcd! You can't change the lcd, you can only match it more closely, and that's the single *only* reason I considered pdksh, in just that light. > > Changing the sh for compatibility sake does not make much sense. > If you are going to change sh, do it for functionality sake... just > make sure the functionality gain is worth the resulting portability > losses. > > Kurt > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic (FreeBSD-current) (301) 220-2114 | and jaunt (NetBSD). ----------------------------+----------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message