> 英语 >
: ${T_INFORM:=$_INFORM} 第一个冒号的作用?
#if the user hits return on any of the fileds,the default value will be used
while :
do
echo -n "Mail Admin When Done[$_INFORM] :"
read T_INFORM
: ${T_INFORM:=$_INFORM}
case $T_INFORM in
yes|Yes) break;;
no|No) break;;
*) echo "The choices are yes,no";;
esac
done
${file:=myfile.txt}若file没设定,则使用myfile.txt作为返回值. 第一个冒号干嘛的?
人气:411 ℃ 时间:2020-05-06 16:07:05
解答
shell不熟悉,帮不到你.
看着像是read的子语句之类的用法:
read T_INFORM :${T_INFORM:=$_INFORM}
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版