shell 中变量前"?"的作用
example:
if ($?USER == 0 || $?prompt == 0) then
....
if ( $?DS_HOME != 0 ) then
if ( ${?HYBRID_ARCHITECTURE} && $HYBRID_ARCHITECTURE == "NONE_HYBRID" ) then
....
表示:如果变量(var)已被设置,则$?var或$(?var)为1,否则为0.
example:
if ($?USER == 0 || $?prompt == 0) then
....
if ( $?DS_HOME != 0 ) then
if ( ${?HYBRID_ARCHITECTURE} && $HYBRID_ARCHITECTURE == "NONE_HYBRID" ) then
....
表示:如果变量(var)已被设置,则$?var或$(?var)为1,否则为0.