Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash set var if not set

${parameter:-word}
    # If parameter is unset or null, the expansion of word is substituted. 
    # Otherwise, the value of parameter is substituted.
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #bash #set #var #set
ADD COMMENT
Topic
Name
1+6 =