Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: help adapting bashism for zsh
- X-seq: zsh-users 23972
- From: "David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx>
- To: zsh users list <zsh-users@xxxxxxx>
- Subject: Re: help adapting bashism for zsh
- Date: Mon, 10 Jun 2019 16:55:05 -0500
- Autocrypt: addr=drankinatty@xxxxxxxxxxxxxxxxxx; prefer-encrypt=mutual; keydata= xsBNBFkinL8BCADU5H9ZxEu+IIMb75pSmVXhW7ujTM7p2TzjZiyTT3Lfbxuoso1rWyAaAti6 Jyfw2pk0SJYw+8afn1+Ag/BtmSGm7wiuGdpHlDL0e/2sbyCYoFExpFLecgd5+mU+M6GCNUaM vZ79BaM2wn+c4r1r0LcPmy7uweHhaVXGlocfMChd2fBweonL2jd4bX64XZbB5YErpkzxFN69 kM+I4CmkzOaSSLfN6//EUgc2zBKGVJhM6fpZjVE4Wm8S+khvrJwFG0ZoaPC1Ol/b47iyqZcf jFZs75i2Tjd3AYyQ6Ai3ZNGrwv2PJSAawR+hfZLeNf5aMaIqoG099SsAN3j8wW97DDjbABEB AAHNRERhdmlkIEMuIFJhbmtpbiwgSi5ELixQLkUuICh3aXphcmQpIDxkcmFua2luYXR0eUBz dWRkZW5saW5rbWFpbC5jb20+wsCOBBMBCAA4FiEEUoo6wDEaJyRJMG0RyQVv1wIPCIcFAlki nL8CGwMFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQyQVv1wIPCId/wgf/b+9BBzhRr2i+ LDa5qHwlxmRbvQZp9yYzFbJV6s4Djyukir7CGYrzAvuFUWBIFiExBspGdHuQ3b/UA66/uupf 6DlzRRTs62WMjK9DTZbQfFxqnx+EWCDKbBlXMsaIu/FjtBtc13uOzza967OdE8l2uxUH7+B4 /S8ReppJ+FXm2pzo4qlq1YYNtX0cd7BymZdn0G2ogeHos2Ay5bYOfiYWFVwb7fnZ54DCsOfb H0M9RUIhA5ZKeChsCOAZvtiMMemIr/xihE8Ds7INbtEXxm00o4xgRiWSSJeuoOfeSilHbVjJ Ry26E/KhKvkZbcnGCJsQRo8DPq5P/O5UQn0HVvGyTs7ATQRZIpy/AQgAwX/4Z6vfnfWsr8WA qV6WYKK8FtIrWXBjEeztxiCAJydMwZkPQRbOJlZElLpZvWLHFp68mbMfrcv23dMJCH+jE5XB La/p7XZp10IHzBhedZbI2MBBsnfrqqCdrf0KNPfS9bD6+37ued+O8ONm4ELhzHfjlGojNddB vMEu7EQKY19u/X2sINiYvrAOX6ss21E4r4AoVojQqaL7fmrRCD2uI76z7O9zC3mQ0/JpkuEo 0Yi97H+P3d3qSDb0IovPPyfioMAy7KIGSAYCHzxd47zvkYWlfSEWQ1aenAAvGgqKrZ3/KP9a V1ekGimYYIpnT/JJ67DPDx9gKlQD9f1YZVcQvwARAQABwsB2BBgBCAAgFiEEUoo6wDEaJyRJ MG0RyQVv1wIPCIcFAlkinL8CGwwACgkQyQVv1wIPCIffjwf/YXoinAWabuqugYxSNafvBcXA GEE5arTYSGSXhUWBER1Oz0U5BjeWAKKtan88pHkFrdHYW8su5A6Dn7jDxUWAVjXzRvA0LNbJ fKOrBw7knGJSqYQD7gdeBJZOSLf0Mt9g9evkxhR4cLFHG0mWH07H1yIreLNFTs+i0B3tKY44 P5bsNcAzMwD2G1rJehiFTbxRlAiCc6v61rzu80XaDKLEJFHVYhCJRXrla04DoGZdZKfc6urF g/aUn+7z1pO70uumOnKvLViitsJ6IsxAsfhZp4KPBbbkTjixcTPfJAQGzQhcoZS22jGTPg1N 7G4xtqMT/M34TbodTbaIO0HkA4n1Hw==
- Disposition-notification-to: "David C. Rankin" <drankinatty@xxxxxxxxxxxxxxxxxx>
- In-reply-to: <04b113b3-b808-5d19-1346-dbcb3038578b@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Openpgp: preference=signencrypt
- Organization: Rankin Law Firm, PLLC
- References: <dc644109-52d9-38e3-277d-ed12a218e0ac@suddenlinkmail.com> <CAN=4vMqyXDxhCkHveii9u1JQPoBNxXK=V3i4tuDHOa1EL7cuTg@mail.gmail.com> <ca2a2084-bb45-1928-415e-4c54c7d76e88@suddenlinkmail.com> <CAN=4vMryLHct7DdxQHV0b7jTmGN-5cA2H3i-j2q6o_uG64+y+w@mail.gmail.com> <04b113b3-b808-5d19-1346-dbcb3038578b@eastlink.ca>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author