Impact of macOS Catalina Defaulting to Unix Shell using Zsh

IMO, you should:

  1. Always define which shell you want to use with a "shebang" such as #!/usr/bin/env zsh -f.

  2. Anticipate a day in which bash is no longer installed at /bin/bash (or at all) and use #!/usr/bin/env bash as the shebang if you have a bash-specific script. That way if you add bash via Homebrew and it ends up at /usr/local/bin/bash then your bash script can still work.

  3. Migrate to zsh whenever possible because it will continue to be installed by default even if bash is not.

3 Likes