Bash Scripting - Conditionals
Which of the following is the correct syntax to check if a variable
var is not empty in bash?var is not empty in bash?-n returns true if the string length is greater than zero (not empty).$var prevents errors if variable is empty or contains spaces.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions