标签:dem echo lin ref param org tac class https
参考: [ Unix & Linux ]
$echo ${JENKINS_VERSION:-2.7.4}
2.7.4
$JENKINS_VERSION=2.99
$echo ${JENKINS_VERSION:-2.7.4}
2.99
shell 给未定义的变量设定默认值 ${parameter:-word}
标签:dem echo lin ref param org tac class https
原文地址:https://www.cnblogs.com/tiantiandas/p/shell_set_default_value_for_unset_variable.html