来自陈贤祥的问题
【:${T_INFORM:=$_INFORM}第一个冒号的作用?#iftheuserhitsreturnonanyofthefileds,thedefaultvaluewillbeusedwhile:doecho-n"MailAdminWhenDone[$_INFORM]:"readT_INFORM:${T_INFORM:=$_INFORM}case$T_INFORMinyes|】
:${T_INFORM:=$_INFORM}第一个冒号的作用?
#iftheuserhitsreturnonanyofthefileds,thedefaultvaluewillbeused
while:
do
echo-n"MailAdminWhenDone[$_INFORM]:"
readT_INFORM
:${T_INFORM:=$_INFORM}
case$T_INFORMin
yes|Yes)break;;
no|No)break;;
*)echo"Thechoicesareyes,no";;
esac
done
${file:=myfile.txt}若file没设定,则使用myfile.txt作为返回值.第一个冒号干嘛的?
1回答
2020-08-02 21:28