简体   繁体   English

以下“ $?run”在shell csh中是什么意思

[英]what does the following “$?run” mean in shell csh

What $?run does in the following example? 在以下示例中, $?run是什么? run is variation with run directory. runrun目录的变体。 I understand that $? 我了解$? has the status of the last command. 具有最后一条命令的状态。

if ( ! $?run ) then  
  set run = $PWD
endif

You can use $?var_name to check if a variable is defined. 您可以使用$?var_name检查是否定义了变量。 From man csh : 来自man csh

   $?name
   ${?name}
           Substitutes the string `1' if name is set, `0' if it is not.

This is not the same as the special $? 这是一样的特殊$? variable (yeah, the syntax is a bit confusing). 变量(是的,语法有点混乱)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM