4 ms·
Nowadays [ is a builtin. The subprocess for a simple branch would be excessive overhead.
by stabbles 9mo ago
Nowadays [ is a builtin. The subprocess for a simple branch would be excessive overhead.
- MontyCarloHall 9mo agoIt is indeed a builtin, but `/bin/[` still exists for compatibility reasons! $ which [ /bin/[ $ type [ [ is a shell builtin The same is true for the `test` command: $ which test /bin/test $ type test test is a shell builtin
- stabbles 9mo agoRight, that's also a good reminder that the builtin `command -V` is typically what you want whenever you use not-always-builtin `which` ;)