3 ms·
yeah, if [ is a command in /bin/ what is [[ ?
by zzzeek 9mo ago
yeah, if [ is a command in /bin/ what is [[ ?
- SAI_Peregrinus 9mo agoA builtin part of the shell, just like `if` and `then` and `fi`. Not all shells have `[[`, the one that doesn't which people unknowingly run into most is probably `dash` as used by Alpine Linux. POSIX doesn't require `[[` in a shell, BASH & Zsh support it but others often don't.
- zzzeek 9mo agoright so "[" is a file in /bin, "[[" is implicitly part of the shell, so that's as bad as I thought