diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2015-05-02 20:55:53 -0500 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2015-05-02 20:55:53 -0500 |
commit | 7bc99fcaf4329b3c25cca671f62a03b67aa4d46e (patch) | |
tree | 642711a64ed60ce09271dd4e3f0e4bc5933fcacb /bash.html.markdown | |
parent | ba76fa9f8fad6656c13a87bfd016f16edf9b0c35 (diff) | |
parent | 6848f45ebeee759afdaa34e6cdf367fe31bf1bab (diff) |
Merge pull request #1080 from kryzhovnik/bash/clear-variable-default-value
Clear explanation of default value expression
Diffstat (limited to 'bash.html.markdown')
-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 81f85d28..4c50c653 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -65,7 +65,8 @@ echo ${VARIABLE:0:LENGTH} # 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 |