所以我有 .csh 脚本 generate.csh 我想从其中调用另一个 .csh 脚本。我试过了
./shell_gen.csh test1 test2.prt
但它运行 shell_gen.csh 但没有命令行参数。
任何人?
谢谢
生成.csh
#!/bin/csh
./shell_gen.csh test1 test2.prt
shell_gen.csh
#!/bin/csh
set source = output
############################################################
# create pbm-gifs/ directory
############################################################
set destination1 = /scratch/graphics/$1gif
echo making $destination1
if ( ! -e $destination1 ) then
mkdir $destination1
foreach file ( $source/*.pgm )
echo convert $file $destination1/$file:t:r.gif
convert $file $destination1/$file:t:r.gif
end
else
echo "$destination1/ exists"
endif