From owner-freebsd-current Sun Nov 1 08:56:50 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA02375 for freebsd-current-outgoing; Sun, 1 Nov 1998 08:56:50 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from lamb.sas.com (lamb.sas.com [192.35.83.8]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA02368 for ; Sun, 1 Nov 1998 08:56:46 -0800 (PST) (envelope-from jwd@unx.sas.com) Received: from mozart (mozart.unx.sas.com [192.58.184.8]) by lamb.sas.com (8.9.1/8.9.1) with SMTP id LAA29976; Sun, 1 Nov 1998 11:56:36 -0500 (EST) Received: from bb01f39.unx.sas.com by mozart (5.65c/SAS/Domains/5-6-90) id AA19182; Sun, 1 Nov 1998 11:56:35 -0500 Received: (from jwd@localhost) by bb01f39.unx.sas.com (8.9.1/8.9.1) id LAA14169; Sun, 1 Nov 1998 11:56:31 -0500 (EST) (envelope-from jwd) From: "John W. DeBoskey" Message-Id: <199811011656.LAA14169@bb01f39.unx.sas.com> Subject: Re: Changing sh for compatibility sake In-Reply-To: From Brian Feldman at "Oct 27, 98 07:31:15 am" To: green@zone.syracuse.net (Brian Feldman) Date: Sun, 1 Nov 1998 11:56:31 -0500 (EST) Cc: freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I sent mail to this list a few months ago... pdksh doesn't run the tail-end of a pipe in the current shell environment, thus the following doesn't work as expected: export FOUND=0 ls | wc -l | while read fcnt; do export FOUND=$fcnt done echo $FOUND So, the comment below might need a slight modification to say which scripts don't break... :-) Thanks! John > Let me repeat this once more: not a SINGLE script breaks with pdksh! > > Brian Feldman > > On Mon, 26 Oct 1998, Kurt D. Zeilenga wrote: > > > Chuck wrote: > > >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? > > > > I've written numerous system/install sh scripts. But it's not to > > one specific implementation, its many. It seems like every OS > > has it's own variant of sh. I do not know of any version of sh > > that can reliable used as a golden target sh. Each and very > > implementation of sh has its quirks that have to be dealt with. > > FreeBSD sh definitely has its, as do the others. > > > > Any change will likely cause problems in some existing scripts. > > Also, any change will cause developers to deal with additional > > portability issues. This is life. Most multiple platform sh > > developers have already adapted to specific quicks of popular > > sh implementations. Changing from one to another should not > > be that big of a deal. I suspect a few FreeBSD-only sh scripts > > will choke. > > > > Don't change sh for compatibility sake, our scripts are already > > compatible! Do change for functionality sake, we'll adapt as > > necessary. > > > > Kurt > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-current" in the body of the message > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message > > ------------------------------ > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message