1.if 条件
if (1) then
cd result
endif
if (0) then
cd ..
endif
上述语句只会执行if (1) 下面的命令
2.变量设置
set定义局部变量,setenv定义全局变量
如:>set A = "how are you"
print $A,prints $A 和puts $A 都不可执行,想要输出内容,使用echo $A,变量内容不能用花括号{}括上,单引号和双引号都可以。
setenv 变量名 变量
1.if 条件
if (1) then
cd result
endif
if (0) then
cd ..
endif
上述语句只会执行if (1) 下面的命令
2.变量设置
set定义局部变量,setenv定义全局变量
如:>set A = "how are you"
print $A,prints $A 和puts $A 都不可执行,想要输出内容,使用echo $A,变量内容不能用花括号{}括上,单引号和双引号都可以。
setenv 变量名 变量