zsh-users
 help / color / mirror / code / Atom feed
From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Dominik Reichardt <dominik@reichardt.de>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Apple bash to zsh script problems with error control and bash emulation
Date: Tue, 17 Nov 2020 22:29:06 +0100	[thread overview]
Message-ID: <CAN=4vMpoN-zccXo=GWK+opzeP8titi1R2Jr0AuH6kE+M5xGxVg@mail.gmail.com> (raw)
In-Reply-To: <26ED4B54-363A-4A03-993D-AB447E062E2A@reichardt.de>

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

On Tue, Nov 17, 2020 at 5:14 PM Dominik Reichardt <dominik@reichardt.de>
wrote:

>
> I switched my interactive shell to zsh on all my machines.
>
> My script did no longer work correctly even though the script invoked bash
> (Apple’s old bash).
>

It's unlikely that the first event has caused the second. In other words,
if you were to do all the same things all over again but *not* switch your
interactive shell to zsh, the bash script would still stop working. My
guess is that you've upgraded macOS, which in turn has caused bash to
downgrade from 5.x to 3.3.

So now I am happy that my script works on all my machines.


I'm glad. If some of your machines are expected to have bash over 10 years
old, it's reasonable to avoid invoking bash in your scripts. I sympathise.
I happen to maintain a few POSIX shell scripts and macOS has really been a
bane with its /bin/sh symlinked to bash 3.3. Writing workarounds for bash
bugs fixed over a decade ago is frustrating.

Roman.

[-- Attachment #2: Type: text/html, Size: 1484 bytes --]

  reply	other threads:[~2020-11-17 21:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 15:00 Dominik Reichardt
2020-11-16 18:01 ` Daniel Shahaf
2020-11-16 18:10   ` Roman Perepelitsa
2020-11-16 19:45   ` Dominik Reichardt
2020-11-16 20:11     ` Roman Perepelitsa
2020-11-16 23:15       ` Lewis Butler
2020-11-17  7:08         ` Roman Perepelitsa
2020-11-17 13:03       ` Dominik Reichardt
2020-11-17 15:54         ` Lewis Butler
2020-11-17 16:13           ` Dominik Reichardt
2020-11-17 21:29             ` Roman Perepelitsa [this message]
2020-11-17 21:47               ` Bart Schaefer
2020-11-17 22:25                 ` Dominik Reichardt
2020-11-18 10:01                 ` Roman Perepelitsa
2020-11-19 13:31             ` Lewis Butler
2020-11-19 13:55               ` Dominik Reichardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN=4vMpoN-zccXo=GWK+opzeP8titi1R2Jr0AuH6kE+M5xGxVg@mail.gmail.com' \
    --to=roman.perepelitsa@gmail.com \
    --cc=dominik@reichardt.de \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).