5 ms·
2. Why should bash be in /usr/bin? Mine's in /usr/local/bin and I've seen vendored bash binaries in very weird places. Respect the user's PATH. 8. '[' and '[['
by ilikejam 4y ago
2. Why should bash be in /usr/bin? Mine's in /usr/local/bin and I've seen vendored bash binaries in very weird places. Respect the user's PATH.
8. '[' and '[[' are both bash builtins.
9/15. If you're using shellcheck, you'll need to quote (almost) all vars anyway.
- rascul 4y ago> 8. '[' and '[[' are both bash builtins. '[' is a builtin, '[[' is a keyword. Can use bash's builtin 'type' to check.
- throw10920 4y ago> 2. Why should bash be in /usr/bin? Mine's in /usr/local/bin and I've seen vendored bash binaries in very weird places. Respect the user's PATH. Yup, nix and guix consistently put their binaries in "very weird places" - unless you want to make users of those tools unhappy (among others!) please use env. The user knows where their shell is more than you do.