-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
It’s wrong to assume that bash is installed in /bin or even installed at all – /bin/bash in shebang is not well portable. Using bash for every shell script is a bad practice that even caused several security issues in the history (that’s why Debian/Ubuntu now uses dash as /bin/sh). Bash is just one of many Shell language implementations and… just look under the hood of its development, into its source repository, you cannot seriously trust it…
You can safely assume that /bin/sh exists (specified in POSIX), as well as /usr/bin/env(the command itself is specified in POSIX, the path is not, but in practice, every *nix system has /usr/bin/env).
Please, don’t teach students that shell = bash, it’s a pretty bad practice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels