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.

marked as duplicate by muru, Kusalananda bash Aug 7 at 9:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.