Remix.run Logo
chasil 10 months ago

Isn't zsh the current #!/bin/sh on MacOS?

Why is this written for bash, which isn't getting recent changes?

alsetmusic 10 months ago | parent [-]

Compatibility with older devices that aren't eligible for recent OS updates, I would assume?

Or, if the person is like me, they're more comfortable in Bash after years of it being the default. Hacking around in a less-familiar shell seems like a bad idea if it's optional when deleting data, regardless of what's currently the default. (I realize that zsh can execute commands with Bash syntax, that's not my point.)

chasil 10 months ago | parent | next [-]

It's actually more appropriate to install dash, and write the script with that.

When this is done, it will run in all the shells, because the script becomes POSIX-compliant.

plorkyeran 10 months ago | parent [-]

Making a macOS-specific script which does not make sense to run anywhere else portable to other platforms is entirely a waste of time.

chasil 10 months ago | parent [-]

Portability between bash and zsh is a waste of time?

Wasn't a previous argument that legacy Macs should remain supported if possible?

smh.

duskwuff 10 months ago | parent | prev [-]

zsh has been available in every version of macOS since 10.0 - there's never been a version where bash was installed but zsh wasn't.