我有一个csh脚本,需要使用newgrp进行部分运行。为此,它递归地调用它自己。 #!/bin/csh
if ($1 == "") then
newgrp << ENDGRP
./newgrp_test.csh 2
if ($status != 0) then
echo "Second run fail"
exit 1
else
我想根据另一个变量在脚本中创建一个变量。 我只是不知道需要在我的代码中调整什么,如果有可能的话。 我正在简化我的代码以便您理解,所以这不是原始代码。 的代码是这样说: #!/bin/csh -f
set list_names=(Albert Bela Corine David)
set Albert_house_number=1
set Bela_house_number=2
set C
我将一个csh脚本移植到Perl。我在Perl中做一个switch语句。我不确定这是否正确,基于Perl中不再使用switch语句的不同意见。如果这是正确的,你可以给我一个想法吗? 同样在switch语句中,我们使用'when'还是'case'? 这是CSH代码: set machine = c16991
set pgMachine = lc0140
if (! -e /abc/site/