Bash Scripting - User Input
In bash, what happens when you use the expression
${input:-default_value} inside a script?${input:-default_value} inside a script?${var:-default} returns the value of var if it is set and non-empty.var is unset or emptyvar is unset or empty, it returns default but does NOT assign it to var.input if set and non-empty; otherwise, it returns default_value without changing input. -> Option Aunset input and echo ${input:-default_value} [OK]15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions