MacOS 10.15 (Catalina) switches from bash to zsh


Login or Register for Dates, Times and to Reply

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) MacOS 10.15 (Catalina) switches from bash to zsh
# 1  
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  
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 . zaiste.net
This User Gave Thanks to Neo For This Post:
# 3  
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  
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: AudioScope.sh 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 06:47 PM.. Reason: Change ksh for zsh...
# 5  
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  
Hi.

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

pwsh
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

zsh

Last edited by drl; 10-26-2019 at 01:36 PM..
These 3 Users Gave Thanks to drl For This Post:
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #889
Difficulty: Easy
In sed, the REGEX caret (^) matches the end of the line.
True or False?

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. Shell Programming and Scripting

Montioring Script Tomcat catalina.out

Hi, I need to monitor the tomcat log file called "Catalina.out" for any errors like out of memory,JDBC exceptions,broken pipe any other errors and exceptions The script should monitor this file and send a mail instantly and create a text file with errors day to day. Iam using Solaris... (3 Replies)
Discussion started by: chaithanyaa
3 Replies

4. 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

5. 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

6. Solaris

Log Rotation of Catalina.out

Hi, Recently i received a request to rotate logs of catalina.out (tomcat). The file size was about 807 MB. I used logadm to truncate the log ( -c ) and zip (-z 0) it. Everything worked fine, catalina.out.0.gz was created (22 MB) and the size of original catalina.out became 0kb. After... (2 Replies)
Discussion started by: Mack1982
2 Replies

7. Shell Programming and Scripting

Command needed to Parse Catalina.out in Linux

Hi all, Everyday I used to parse the Catalina.out log file on my Redhat system for errors for a particular date. Could anybody be able to help me to create a command which can grep the contents of Catalina.out starting from particular date. Please do not suggest command which greps only the... (12 Replies)
Discussion started by: redhatperl
12 Replies

8. 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

9. Solaris

Catalina Analysis

How can I make analysis for catalina.out (2 Replies)
Discussion started by: Burhan
2 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

Featured Tech Videos