diff --git a/bash.html.markdown b/bash.html.markdown index 856db706..407b237b 100644 --- a/bash.html.markdown +++ b/bash.html.markdown @@ -88,6 +88,11 @@ echo ${Variable: -5} # => tring # String length echo ${#Variable} # => 11 +# Indirect expansion +OtherVariable="Variable" +echo ${!OtherVariable} # => Some String +# This will expand the value of the OtherVariable + # Default value for variable echo ${Foo:-"DefaultValueIfFooIsMissingOrEmpty"} # => DefaultValueIfFooIsMissingOrEmpty