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=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26667 invoked from network); 4 Jan 2023 01:30:39 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 4 Jan 2023 01:30:39 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 690354253B; Wed, 4 Jan 2023 11:30:34 +1000 (AEST) Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by minnie.tuhs.org (Postfix) with ESMTPS id A1B0942538 for ; Wed, 4 Jan 2023 11:30:27 +1000 (AEST) Received: by mail-pj1-f49.google.com with SMTP id fz16-20020a17090b025000b002269d6c2d83so243555pjb.0 for ; Tue, 03 Jan 2023 17:30:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3WyiSJWh2+4tw4ieC0varpf61MbssShetlaJgK+a6w0=; b=hvYkiL76KNcgAEnPv+g5GJpUjUXYfcbmQ4Q7hmO6/o3ucy8lZgpoao1BImTtehkNm2 UQjcmhAAS2eNxui6OJlG/JdECBvh9z1WU9uNBVL37pnSZlnSlEr1WyEzLzW94rF32JYb LuNrbTvlOBmq3eifstcKttOpGpunQf5wc4Wd4/lG0IgrQeqNPtQN9mPeB9aXFNcSAjrP ouiJXhHtmjb3vFTZLxOap1OkCDb37ERoQORyTqnaRWCMErBvTt1/HdN3az6Pbt05gwJG Jn/ZnUEhj8PQeOji+1rmU3PTHM0vuvw+h2hNNSL/ZQL4AQEHRuzrEX0gYMWbw+x9OC41 zy9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3WyiSJWh2+4tw4ieC0varpf61MbssShetlaJgK+a6w0=; b=773dYGuF/RapUrKRHsXRzrtHWDY0okRCTCEK8nvw/kFDMQGnup6AhmiKLkK5q9CFTd 9MbvZvfq235LMq3zAQe1vmFfuAZJe2wMyueigB6zvh5L+B6TWwqMzh5YliISJhlrau/M zSXwvo+3yvf43HLnNbR9F+1SSVjzsl5XY5+gYJng/OqUgZd8DI8Cef1H0Gyw0nTo8vRI aEoZIdWc9rJJKQghMuk6VsSDMYWGx8SdtXrMNbQRYZ/CmVZHETAQRnYFbg30bxCkw0yh uZ+b4F12WA+ksej1o5qErNLlJW5VjJGZnEtKMCNrofTKitOjXpYVzRnAV/xOfMlI2Fzb hG0g== X-Gm-Message-State: AFqh2kpHhagPv76dm6OJASB9LBd0Fs6lbzobQ6owaaMaRE2RoaNadlED T4bO0ImbjvxKml6iwYpFpxg= X-Google-Smtp-Source: AMrXdXvy8BTz+0C41uVT7T0J0jjx6tzmJdOS0NgO9UyhyhyxOaORmVzTqcKwo/2X5egvd+qygixL5g== X-Received: by 2002:a17:902:9a96:b0:192:c264:7141 with SMTP id w22-20020a1709029a9600b00192c2647141mr10557182plp.54.1672795766986; Tue, 03 Jan 2023 17:29:26 -0800 (PST) Received: from smtpclient.apple (ip98-165-124-124.ph.ph.cox.net. [98.165.124.124]) by smtp.gmail.com with ESMTPSA id ik29-20020a170902ab1d00b00177fb862a87sm22974951plb.20.2023.01.03.17.29.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jan 2023 17:29:26 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) From: Adam Thornton In-Reply-To: Date: Tue, 3 Jan 2023 18:29:15 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Dan Cross X-Mailer: Apple Mail (2.3731.300.101.1.3) Message-ID-Hash: HCTQ3FRKDVD6GTRXWQUTAQT2FWFZJWXI X-Message-ID-Hash: HCTQ3FRKDVD6GTRXWQUTAQT2FWFZJWXI X-MailFrom: athornton@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Douglas McIlroy , TUHS main list X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: A few comments on porting the Bourne shell List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: > On Jan 3, 2023, at 10:26 AM, Dan Cross wrote: >=20 >=20 > A few years ago, I was having lunch with some folks from the Go team > and one of them remarked, "you shouldn't write a shell script that's > longer than about 10 lines. Once you do, it's time to rewrite it in a > real programming language." I was a bit taken aback, but they had a > point. I'll note that Go standardized on using bash everywhere. My number is larger than 10, but it's smaller than 100. Lord knows I have plenty of things that started as a pipe = and-or-for-loop at the command line, that became a shell script, that = grew some arguments, that got beefier, and that I then rewrote in Perl = or Python and cursed myself for not having done it that way from the = start. The RSP Notebook I mentioned on COFF is about to have its = installer--which is a hodgepodge of shell scripts and Python = scripts--rewritten as reasonable Python classes with typing and test = cases and everything, because it's grown enough that it's hard to = understand in its current form. Adam=