Multiple choice technology

Command to verify whether a string is null.

  1. -n

  2. -z

  3. -s

  4. None of the above

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

The -z test operator returns true if a string has zero length (is empty/null). -n tests for non-zero length, -s tests if a file exists and is non-empty.