What's the difference between name="${name:-Henry}"
and name="Henry"
in bash?
Asked
Active
Viewed 30 times
0

Timisorean
- 1,388
- 7
- 20
- 30

ejohnson
- 139
- 1
- 4
- 16
-
1If the variable is not set, use the default (`"Henry"` in this case) – Explosion Pills Aug 28 '18 at 18:17
-
1Read: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html – iamauser Aug 28 '18 at 18:19
-
Thanks and sorry for asking the question without proper research – ejohnson Aug 28 '18 at 18:28