MacOS 10.15 (Catalina) switches from bash to zsh

Thread Tools Search this Thread
Operating Systems OS X (Apple) MacOS 10.15 (Catalina) switches from bash to zsh
# 1  
Old 10-25-2019
MacOS 10.15 (Catalina) switches from bash to zsh

Interestingly Apple has decided to switch the default shell for new users from bash to zsh in MacOS Catalina (10.15)
Use zsh as the default shell on your Mac - Apple Support

Another interesting fact is that Catalina also comes with /bin/dash
# 2  
Old 10-25-2019
Yeah, I read somewhere it was related to licenses issues.

When I upgraded to Catalina, I noticed that existing users who were using bash (like me) as their default shell, still have bash after the upgrade.

Anyway, since I'm am more of a PHP (and more and more, Python) guy for scripting (for processing text), this change does not really impact me; but since I do write some scripts in bash for Linux, I will stick to bash as my default shell on MacOS for now.

I'm very interested to hear and read from the "hard core shell scripting folks" about their views on this change.

See also:

Zsh Primer for Busy People .
This User Gave Thanks to Neo For This Post:
# 3  
Old 10-25-2019
zsh is a really odd choice. It's a hodgepodge of features from bourne and csh, with its own special extensions. It's not comparable and not compatible.

I don't know why they needed a shell to be app-store compatible, but it probably isn't good. Perhaps they're ripping OSX apart and moving bits to the app store. It mMakes sense from a business point of view -- a good way to force everyone who's avoided the app store to use it. It makes sense from a software point of view -- why have two installer/updater systems?
# 4  
Old 10-25-2019
I am not sure if I am "hard core" but in general it does not matter to me so long as bash is not removed from the '/bin' drawer|folder|directory at all.
Reason: does not run in the zsh shell and I now try to get everything working in POSIX compatibility mode.

So that makes me indifferent because if 'zsh' is as POSIX compliant as the developers say it is then that's fine by me...

Last edited by wisecracker; 10-27-2019 at 05:47 PM.. Reason: Change ksh for zsh...
# 5  
Old 10-25-2019
You'll find that zsh is similar to bash. Many bashisms work in zsh.

In rare cases zsh deviates from sh and the standard, for a good reason.
For ex $var in a for list is not expanded the usual way; you must explicitly enforce it with ${=var}
(And because zsh like bash allows $#var instead of the standard ${#var} you may use $=var.)
Now ask yourself: how often do you want this kind of expansion, and how often do you stumble over an unwanted expansion?
# 6  
Old 10-26-2019

Thanks to Scrutinizer for starting this (and possibly to wisecracker for an earlier note).

My collection of links is below, in no specific order of usefulness.

My current interest in shells is zsh, but also the very new nu, and PowerShell (pwsh). The nu shell looks to be very useful for tables/csv files, and is written in Rust, a language in which I am also interested (the grep-work-alike written in Rust is the fastest of the greps which I track and periodically test: GitHub - BurntSushi/ripgrep: ripgrep recursively searches directories for a regex pattern).

Here are some links to information on these ... cheers, drl

Learn PowerShell in a Month of Lunches, Linux and macOS Edition
Manning | Learn PowerShell in a Month of Lunches, Linux and macOS Edition

nushell, nu:
homepage = Nu
documentation = Introduction - The Nu Book
repository = GitHub - nushell/nushell: A modern shell written in Rust


Last edited by drl; 10-26-2019 at 12:36 PM..
These 3 Users Gave Thanks to drl For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. OS X (Apple)

MacOS 10.15.2 Catalina display crash and system panic

MacPro (2013) 12-Core, 64GB RAM (today's crash): panic(cpu 2 caller 0xffffff7f8b333ad5): userspace watchdog timeout: no successful checkins from in 120 seconds service:, total successful checkins since load (318824 seconds ago): 31883, last successful... (3 Replies)
Discussion started by: Neo
3 Replies

2. Programming

A Slightly Better NTP Client for the ESP32 (ESPWROOM32) on macOS Catalina

Currently have two ESP8266 modules testing some Blynk apps, whereI'm not so happy with the Blynk business model for developers, but that's another story. So, with two of my ESP8266s currently "busy", I decided to work on the ESP32, and in particular the ESPWROOM32. I installed the... (0 Replies)
Discussion started by: Neo
0 Replies

3. Windows & DOS: Issues & Discussions

Poor Windows 10 Performance of Parallels Desktop 15 on macOS Catalina

Just a quick note for macOS users. I just installed (and removed) Parallels Desktop 15 Edition on my MacPro (2013) with 64GB memory and 12-cores, which is running the latest version of macOS Catalina as of this post. The reason for this install was to test some RIGOL test gear software which... (6 Replies)
Discussion started by: Neo
6 Replies

4. Programming

Python Screen Capture of RIGOL 1054Z on macOS Catalina Using NI-VISA

On the NI-VISA boards there has been some frustration where folks cannot get NI-VISA to work on macOS Catalina because Catalina (macOS 10.15.x) is "not supported" by NI-VISA (for many months, it seems). Currently, the README shows: NI-VISA 19.0 for macOS supports the following platforms: ... (10 Replies)
Discussion started by: Neo
10 Replies

5. OS X (Apple)

MacOS 10.15 Catalina Crashes and Freezes on Boot

Sadly, I have turned off my access to the Apple Developers Beta program after installing macOS 10.15 Catalina a few days ago. After the install, I rebooted by MacBook Air and it "hard froze" and we were heading out of town so I grabbed a backup MBA running Mojave. Then, after getting back at... (10 Replies)
Discussion started by: Neo
10 Replies

6. Shell Programming and Scripting

Terminal running bash/rsync script does not close with exit (MacOS High SIerra)

Hello, I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using, #!/bin/bash # main backup location, trailing slash included backup_loc="/Volumes/Archive_Volume/00_macos_backup/" # generic backup function function backup {... (12 Replies)
Discussion started by: LMHmedchem
12 Replies

7. Shell Programming and Scripting

Run bash command inside zsh script

Hi, I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh). I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory " eve though I merged the whole... (7 Replies)
Discussion started by: kamcamonty
7 Replies

8. Shell Programming and Scripting

a simple for loop in bash and zsh

Hi! I am just starting to learn scripting. I am trying a simple script in bash and zsh I have two questions: First: Why zsh does not expand the var M? What I am doing wrong? localhost galanom # bash -c 'M="m1 m2 m3 m4 m5"; for x in $M; do echo "<$x>"; done' <m1> <m2> <m3> <m4> <m5>... (1 Reply)
Discussion started by: galanom
1 Replies

9. Shell Programming and Scripting

From bash to csh and zsh

... Am I glad to find this forum (and vBulletin too, nice!).. OK, here's my issue. I have been handballed a bash script, not pretty but functional. I need to change to csh and zsh. For the csh I have the basics (e.g., such as change if/fi to if/endif, quote the variables, and bracket commands).... (10 Replies)
Discussion started by: lev_lafayette
10 Replies

10. Solaris

Missing init files for zsh and bash

I change my default shell to zsh but can't find the init files, .zshrc and .zlogin from /export/home and /home. The other shells init files are there:.cshrc, .profile and .login. Am I suppose to use these as templates? Also, bash_history is there but not zsh_history although zsh do keep a... (2 Replies)
Discussion started by: maag
2 Replies
Login or Register to Ask a Question

Featured Tech Videos