From 6848f45ebeee759afdaa34e6cdf367fe31bf1bab Mon Sep 17 00:00:00 2001 From: Andrey Samsonov Date: Sat, 2 May 2015 16:21:03 +0400 Subject: Clear explanation of default value expression --- bash.html.markdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bash.html.markdown b/bash.html.markdown index e0c12f97..58dc3003 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -64,7 +64,8 @@ echo ${VARIABLE:0:7} # Default value for variable echo ${FOO:-"DefaultValueIfFOOIsMissingOrEmpty"} -# This works for null (FOO=), empty string (FOO=""), zero (FOO=0) returns 0 +# This works for null (FOO=) and empty string (FOO=""); zero (FOO=0) returns 0. +# Note that it only returns default value and doesn't change variable value. # Builtin variables: # There are some useful builtin variables, like -- cgit v1.2.3