# echo ${var}
# echo ${var:-world}
world
# var='hello'
# echo ${var}
hello
# echo ${var:-world}
hello
Could you explain why the second echo ${var:-world}
output hello
other than world
?
By the way, what's the topic called in English? I searched cut string, sub string... Thanks.