From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id d25c9928 for ; Mon, 10 Jun 2019 21:55:52 +0000 (UTC) Received: (qmail 21291 invoked by alias); 10 Jun 2019 21:55:44 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23972 Received: (qmail 14129 invoked by uid 1010); 10 Jun 2019 21:55:44 -0000 X-Qmail-Scanner-Diagnostics: from omta03.suddenlink.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25475. spamassassin: 3.4.2. Clear:RC:0(208.180.40.73):SA:0(-2.6/5.0):. Processed in 1.239751 secs); 10 Jun 2019 21:55:44 -0000 X-Envelope-From: drankinatty@suddenlinkmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at suddenlink.net designates 208.180.40.73 as permitted sender) Subject: Re: help adapting bashism for zsh To: zsh users list References: <04b113b3-b808-5d19-1346-dbcb3038578b@eastlink.ca> From: "David C. Rankin" Openpgp: preference=signencrypt Autocrypt: addr=drankinatty@suddenlinkmail.com; prefer-encrypt=mutual; keydata= xsBNBFkinL8BCADU5H9ZxEu+IIMb75pSmVXhW7ujTM7p2TzjZiyTT3Lfbxuoso1rWyAaAti6 Jyfw2pk0SJYw+8afn1+Ag/BtmSGm7wiuGdpHlDL0e/2sbyCYoFExpFLecgd5+mU+M6GCNUaM vZ79BaM2wn+c4r1r0LcPmy7uweHhaVXGlocfMCh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1YZVcQvwARAQABwsB2BBgBCAAgFiEEUoo6wDEaJyRJ MG0RyQVv1wIPCIcFAlkinL8CGwwACgkQyQVv1wIPCIffjwf/YXoinAWabuqugYxSNafvBcXA GEE5arTYSGSXhUWBER1Oz0U5BjeWAKKtan88pHkFrdHYW8su5A6Dn7jDxUWAVjXzRvA0LNbJ fKOrBw7knGJSqYQD7gdeBJZOSLf0Mt9g9evkxhR4cLFHG0mWH07H1yIreLNFTs+i0B3tKY44 P5bsNcAzMwD2G1rJehiFTbxRlAiCc6v61rzu80XaDKLEJFHVYhCJRXrla04DoGZdZKfc6urF g/aUn+7z1pO70uumOnKvLViitsJ6IsxAsfhZp4KPBbbkTjixcTPfJAQGzQhcoZS22jGTPg1N 7G4xtqMT/M34TbodTbaIO0HkA4n1Hw== Organization: Rankin Law Firm, PLLC Message-ID: <7e24f39d-e565-db0f-7cdf-46132ade5dcf@suddenlinkmail.com> Date: Mon, 10 Jun 2019 16:55:05 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <04b113b3-b808-5d19-1346-dbcb3038578b@eastlink.ca> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authentication-Info: Submitted using SMTP AUTH PLAIN at dalofep03.suddenlink.net from [66.76.46.195] using ID drankinatty@suddenlinkmail.com at Mon, 10 Jun 2019 16:55:08 -0500 X-CM-Analysis: v=2.3 cv=JvWPU/wC c=1 sm=1 tr=0 cx=a_idp_d a=/cos1G3ae6AqFCvJLv+j9g==:117 a=/cos1G3ae6AqFCvJLv+j9g==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=dq6fvYVFJ5YA:10 a=jpK-eZvCitL-ffABf7IA:9 a=QEXdDO2ut3YA:10 X-CM-Envelope: MS4wfA6gvQVHgvseGyQe30i1QGgE+WBFlG43LSwYvk9Lf1FIg7c0P9XiQ2AvW6/Z4so/TRFzbw8gARWcvBhgvzjz/MzYdUB2mBk8xiF7FgP6XYX2WrYw1DGH 5kf3jKow5FrO7Jxafe07MJdsXPuvX+LPQqxvJzggj6EHmX0t8gbItjEqNJIpBeHa+18KupARPCXvxw== On 06/10/2019 12:34 PM, Ray Andrews wrote: > On 2019-06-10 7:53 a.m., Roman Perepelitsa wrote: >> automatic translation of bash code to zsh. It's likely that your >> requirements are unique. Usually systems that can afford to have zsh >> can also afford to have bash, so no translation is necessary. >> > In my case I didn't want the bother of having to learn the idiosyncrasies of > two shells.  I picked one and was hoping to never have to learn the other.  If > I was planning to transition from bash to zsh, I'd be hoping to subsequently > avoid bash altogether and thus go through the conversion trouble once but then > forget about bash and do all further work in zsh.  So space considerations > would be the least of my motives.  Just me, but zsh syntax is so abstruse that > not only learning it, but also trying to remember the differences vis a vis > bash, would seem brain blowing. > > So it seems David will have to do it line by line. That's the interesting part. I have 2-decades of bash, which with the bashisms makes that somewhat of a daunting challenge. The "2566 POSIX and bash scripts" wasn't a guess, it was a 'find ~/scr -type f | wc -l' exercise. From the days of loading Linux from floppy disks from boxed sets, you didn't really have a lot of foresight as to the implications of shell choice, which is what makes the shell differences now more acute. So the path forward seems like leaving all shells installed the only solution and migrate the needed scripts one at a time. We shall see how it goes. -- David C. Rankin, J.D.,P.E.