参考: [ 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
原文地址:https://www.cnblogs.com/tiantiandas/p/shell_set_default_value_for_unset_variable.html
时间: 2024-10-29 19:12:03