Merge pull request #1080 from kryzhovnik/bash/clear-variable-default-value

Clear explanation of default value expression
This commit is contained in:
Levi Bostian 2015-05-02 20:55:53 -05:00
commit 7bc99fcaf4

View File

@ -65,7 +65,8 @@ echo ${VARIABLE:0:LENGTH}
# Default value for variable # Default value for variable
echo ${FOO:-"DefaultValueIfFOOIsMissingOrEmpty"} 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: # Builtin variables:
# There are some useful builtin variables, like # There are some useful builtin variables, like