The syntax inside [[ is different though.
The [[ test syntax is not implemented in dash. It is listed as a future reserved word in the POSIX shell standard, but is not (yet?) specified.
(Google: POSIX shell)
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
If you pull the HTML file off the above link, you will get a directory listing of all of the POSIX.2 utilities (tar, sed, awk, etc.). The options that you find in the specifications are maximally portable.
The [[ test syntax is not implemented in dash. It is listed as a future reserved word in the POSIX shell standard, but is not (yet?) specified.
(Google: POSIX shell)
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...
If you pull the HTML file off the above link, you will get a directory listing of all of the POSIX.2 utilities (tar, sed, awk, etc.). The options that you find in the specifications are maximally portable.