且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

'$' 是什么?在shell脚本中是什么意思?

更新时间:2022-06-18 04:30:32

$?

返回最后完成的命令的状态.状态 0 表示一切正常.

returns the status of the last finished command. Status 0 tells you that everything finished ok.

此外,$ 符号是一个特殊符号 - 在这种情况下 $val 提取由变量 val 保存的值

In addition the $ sign is a special symbol - and in that case $val extract the value that is hold by the variable val