Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/apache-spark/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arrays 在C shell中,如何使用;如果;检查数组是否包含特定变量的语句?_Arrays_Shell_If Statement_Variables_Csh - Fatal编程技术网

Arrays 在C shell中,如何使用;如果;检查数组是否包含特定变量的语句?

Arrays 在C shell中,如何使用;如果;检查数组是否包含特定变量的语句?,arrays,shell,if-statement,variables,csh,Arrays,Shell,If Statement,Variables,Csh,我想使用“if”来检查数组是否包含特定的变量。 比如: if ($var exist in $array) then //execute commands endif

我想使用“if”来检查数组是否包含特定的变量。 比如:

if ($var exist in $array) then
 //execute commands
endif