求解释如下脚本
时间:10-02
整理:3721RD
点击:
################ check CDSDIR environment variable
if (${?CDSDIR}) then
# checks, if CDS-tree exists at specified location
if ( (! -e ${CDSDIR}/tools/dfII/bin)) then
echo -n "${AMS_ERROR} Fatal Error: "
echo "CDSDIR is set to $CDSDIR, which is not a valid CDS software tree."
exit 1
endif
else
echo -n "${AMS_ERROR} Error: "
echo "Environment variable CDSDIR is not set\!"
echo -n "${AMS_ERROR} Info: "
echo "Please set CDSDIR to the location of the CDS software tree."
exit 1
endif
‘?’什么意思?
在我看来 两端if 无论如何都会报错。
求解释
if (${?CDSDIR}) then==>如果定义了CDSDIR变量,就执行后面的语句