在 CSH 中,是否可以在同一个 if 子句中嵌套对变量是否存在的测试及其值的测试?
#!/bin/csh
# This seems to work...
if ( $?VAR ) then
echo "VAR exists"
if ( $VAR == true ) then
echo "VAR is true"
endif
endif
# I want something more like this:
if (( $?VAR ) && ( $VAR == true )) then
echo "VAR exists and is true"
endif