3 ms·
nah I always use /bin/bash because I use bash features and I don't want to use some crappy dash or fish or whatever default shell is set on the system
by VWWHFSfQ 3y ago
nah I always use /bin/bash because I use bash features and I don't want to use some crappy dash or fish or whatever default shell is set on the system
- masklinn 3y agoThat you’re using bash is an other problem which you also have. But the issue I’m talking about is using the specific path /bin/bash, as that just reduces compatibility compared to going through env.
- VWWHFSfQ 3y agono I like bash and all the systems I care about have /bin/bash so I don't care the /usr/bin/env bash thing always just seemed like pointless cargo culting to me. never had this problem
- doubled112 3y agoI think it is fair not to care if it isn't making a difference for you. “/usr/bin/env bash” will keep the shebang working between a Linux and FreeBSD (and probably other *NIX) machines. This bit me at one point, and it just became a habit since. Bash (if installed) is in /usr/local/bin there. Other interpreters often are too.
- _piif 3y agoAlso /usr/bin/env bash is required on NixOS and Guix, neither of which have /bin/bash.
- charcircuit 3y ago/usr/bin/env does not exist on Android. shebangs are inherently not portable because they can't be used to find a binary using $PATH.
- MrStonedOne 3y ago[dead]
- solarkraft 3y agoMan, I've tried to write POSIX-compatible scripts for a long time - twice as long as I'd probably have taken using bash features (using Python I'd probably have taken 1/10th of the time and it'd be way more maintainable now).
- kevin_thibedeau 3y agoThis is being done in the name of Solaris compatibility (why?) so you don't even get to use POSIX shell since it isn't in /bin/sh on that OS.
- pepa65 3y agoPython is in no way better maintainable than bash. If you'd used Python, most of your scripts would be broken right now. With bash, that just doesn't happen (to that extent).