Multiple choice technology operating systems

What is the output of the following command in bash shell on Linux? $ i=2 $ [ $i -lt 2 ] || echo great

  1. great

  2. no output

  3. test: syntax error

  4. we will have to export the value of i

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The condition [ $i -lt 2 ] evaluates to false since 2 is not less than 2. In bash, the || operator executes the right side only if the left side returns false (exit code non-zero). Therefore, 'echo great' runs and outputs 'great' to the terminal.