1

It is often written:

  • /usr/bin/test is a synonym for /usr/bin/[
  • [[ is a bash improvement for [
  • test and [ are also builtins

I understand the difference between [ and [[ but I am confused with the binary vs. builtin relationship here. What is really used in my scripts when I use [ or [[ if /usr/bin/test and /usr/bin/[ are also present in my system?

In the manpage for test, there is missing the often-used option -a, which is listed in help test. I would guess [ is used as a builtin, if this option works.