Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Importantly, auto_log reports an error and terminates script execution if no tag string is specified, via exit 255 (we'll see much more on error handling shortly).

The conditional test is made using a bash if/else/fi block, where double brackets ('"[[ ]]") enclose the test, always followed by a semicolon (";") or a new line. Note that there must always be a space after the open brackets, and one before the close brackets. Here the test is for string equality (see https://www.gnu.org/software/bash/manual/html_node/Bash-Conditional-Expressions.html for a complete list of bash comparison operators).

...