参考: [ Unix & Linux ]
Shell Demo
$echo ${JENKINS_VERSION:-2.7.4}
2.7.4
$JENKINS_VERSION=2.99
$echo ${JENKINS_VERSION:-2.7.4}
2.99
参考: [ Unix & Linux ]
$echo ${JENKINS_VERSION:-2.7.4}
2.7.4
$JENKINS_VERSION=2.99
$echo ${JENKINS_VERSION:-2.7.4}
2.99
转载于:https://www.cnblogs.com/tiantiandas/p/shell_set_default_value_for_unset_variable.html