From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19626 invoked from network); 22 Dec 2021 06:30:40 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 22 Dec 2021 06:30:40 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 0FE139CEC3; Wed, 22 Dec 2021 16:30:36 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id CCE919CC01; Wed, 22 Dec 2021 16:30:05 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id D8B229CC01; Wed, 22 Dec 2021 16:30:00 +1000 (AEST) X-Greylist: delayed 401 seconds by postgrey-1.36 at minnie.tuhs.org; Wed, 22 Dec 2021 16:29:59 AEST Received: from waffle.shalott.net (waffle.shalott.net [209.151.236.43]) by minnie.tuhs.org (Postfix) with ESMTPS id 1223E9CC00 for ; Wed, 22 Dec 2021 16:29:59 +1000 (AEST) Received: (qmail 15240 invoked by uid 2034); 22 Dec 2021 06:23:17 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 22 Dec 2021 06:23:17 -0000 Date: Tue, 21 Dec 2021 22:23:17 -0800 (PST) From: jason-tuhs@shalott.net X-X-Sender: jason@waffle.shalott.net To: TUHS main list In-Reply-To: <9e3b9669-6ffc-2701-bdcb-e287495419c0@spamtrap.tnetconsulting.net> Message-ID: References: <20201222224306.GA28478@minnie.tuhs.org> <202012230546.0BN5kDwe028815@sdf.org> <1653639b-8e41-7437-8c0e-32564dfdd788@laposte.net> <20211221162139.GP24180@mcvoy.com> <9e3b9669-6ffc-2701-bdcb-e287495419c0@spamtrap.tnetconsulting.net> User-Agent: Alpine 2.23 (LRH 453 2020-06-18) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Subject: Re: [TUHS] ksh88 source code? X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" >> Bash is GPLd. Ksh isn't. :) > What is the effective difference between GPLed software; Bash, vs > non-GPLed software; Ksh? > > Why, as a lay user, would I care? As an end user, you would not care. As a vendor or distributor, you would care. Anyone doing an OS or other software distribution (think the BSDs, of course; but also think Apple or Microsoft) needs to care. Anyone selling a hardware device with embedded software (think switches/routers; think IOT devices; think consumer devices like DVRs; etc) needs to care. GPL (or similar "virally" licensed) software carries legal implications for anyone selling or distributing products that contain such software; and this can be a motivation to use software with less-restrictive license terms. > I get the historical interest, but in today's world, is there any > advantage to ksh over bash? I'm aware of a few random features that are in ksh93 but not other shells (random, trivial, example that I saw just today*: "printf %(FORMAT)T"). That said, my first impulse would have been to say no, there aren't any meaningful (technical) advantages to ksh over bash -- except that it seems there's still some amount of active development going on in ksh: https://github.com/att/ast/issues/1466 So I guess, for some people at least, there are indeed reasons to prefer it, including (according to users in those github issues) performance. On the licensing front, the GPL is an issue for bash; but zsh is available as a more modern, fully-featured shell that avoids any GPL issues. This is why Apple switched the default shell in OSX from bash to zsh: they wanted to avoid the GPLv3. Previously, they had been shipping the last GPLv2 version of bash, which was from 2006. According to this blog, they've been avoiding any GPLv3 code and actively working to remove even GPLv2 code in OSX for quite a while: http://meta.ath0.com/2012/02/05/apples-great-gpl-purge/ -Jason * bash seems to recognize %(FORMAT)T, but only takes epoch seconds as an argument. ksh93 takes anything vaguely date-like. zsh and pdksh don't recognize it at all. for S in ksh93 pdksh bash zsh ; do echo "===> ${S} <===" ; eval "${S} -c 'printf \"%(%F)T\n\" \"last thursday\"'" ; echo "" ; done ===> ksh93 <=== 2021-12-16 ===> pdksh <=== printf: illegal format character ( ===> bash <=== bash: line 1: printf: last thursday: invalid number 1969-12-31 ===> zsh <=== zsh:printf:1: %(: invalid directive