diff options
author | Andrey Samsonov <andrey.samsonov@gmail.com> | 2015-05-02 16:21:03 +0400 |
---|---|---|
committer | Andrey Samsonov <andrey.samsonov@gmail.com> | 2015-05-02 16:21:03 +0400 |
commit | 6848f45ebeee759afdaa34e6cdf367fe31bf1bab (patch) | |
tree | c963a35923749ff8303085545abe0d6d4f257aa3 | |
parent | 7f1c4293e448f9ff1e14587c189dd672ad8c19e5 (diff) |
Clear explanation of default value expression
-rw-r--r-- | bash.html.markdown | 3 |
1 files changed, 2 insertions, 1 deletions
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 |