3 ms·
> effectively making the system think that every command was "successful" I can only imagine the havoc this would wreak on shell scripts that call out to the t
by jeroenhd 1y ago
> effectively making the system think that every command was "successful"
I can only imagine the havoc this would wreak on shell scripts that call out to the test/[/[[ binaries on a system.
- porridgeraisin 1y agonit: while test and [ are binaries, [[ is a bash keyword.
- jeroenhd 1y agoAh, you're right of course. Thank goodness for shellcheck keeping my .sh scripts compatible.
- __david__ 1y agoAnother nit, while test and [ are indeed binaries, they are also bash built-ins (for performance, presumably) so bash won’t exec them normally.
- porridgeraisin 1y agoTrue! And for those curious, you can enable disable this shadowing per command, like so: enable test enable -n test # disable enable -n [ You can also use command test -f file.txt To override builtins once.