Multiple choice technology

How to set NULL value to a variable

  1. name=

  2. name=''

  3. name=""

  4. all of the above

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

All three methods set a variable to null/empty: name= (no value), name='' (empty single quotes), name="" (empty double quotes). In shell scripting, these all result in an empty string value, effectively NULL.