Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
netr0ute
4y ago
0 comments
Share
Why would anyone want to target bash specifically which doesn't exist in all systems instead of just sticking to what's implemented in /bin/sh?
0 comments
default
newest
oldest
cure
4y ago
Because you're not going to have a great time with /bin/sh (i.e. dash or the like) if you want to do anything more than very, very basic scripts.
netr0ute
OP
4y ago
Relying on bash is a recipe for non-portability.
lamontcg
4y ago
If you're not publishing your scripts and you're running your own infrastructure, you probably don't care about portability at all.
1 more reply
massysett
4y ago
You don't really know exactly what you'll get with /bin/sh - you might get bash trying to behave like sh, you might get dash. At least with /bin/bash you're hopefully getting bash. Now you just have to wonder what version...
j
/
k
navigate · click thread line to collapse