Why does sh -version on my mac output the version of a bash shell?
1
vote
2
answers
120
views
I see
sh -version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)
Copyright (C) 2007 Free Software Foundation, Inc.
yet in https://developer.apple.com/library/archive/documentation/OpenSource/Conceptual/ShellScripting/shell_scripts/shell_scripts.html
it mentions that
/bin/sh
is the Bourne Shell: *The first thing you should notice is that the script starts with ‘#!’. This is known as an interpreter line. If you don’t specify an interpreter line, the default is usually the Bourne shell (/bin/sh). However, it is best to specify this line anyway for consistency.*
I know in Linux /bin/sh points to the default shell, which defaults to Bash. but the apple script link is saying something else.
Asked by infoMining
(21 rep)
Jun 13, 2025, 07:48 PM
Last activity: Jun 28, 2025, 08:04 PM
Last activity: Jun 28, 2025, 08:04 PM