代码: 全选
# set temporary file name
: ${TMPDIR:=$TEMPDIR}
: ${TMPDIR:=$TMP}
: ${TMPDIR:=/tmp}
此段代码想干什么呢?
代码: 全选
# set temporary file name
: ${TMPDIR:=$TEMPDIR}
: ${TMPDIR:=$TMP}
: ${TMPDIR:=/tmp}
bash(1) 写了: ${parameter:=word}
Assign Default Values. If parameter is unset or null, the
expansion of word is assigned to parameter. The value of
parameter is then substituted. Positional parameters and spe‐
cial parameters may not be assigned to in this way.
谢谢yaoms 写了:bash(1) 写了: ${parameter:=word}
Assign Default Values. If parameter is unset or null, the
expansion of word is assigned to parameter. The value of
parameter is then substituted. Positional parameters and spe‐
cial parameters may not be assigned to in this way.