所以我有.csh脚本generate.csh 我想从其中调用另一个.csh脚本。 我试图如何使用.csh脚本的命令行参数执行.csh脚本
./shell_gen.csh test1的test2.prt
但它运行shell_gen.csh但没有命令行参数。
有人吗?
感谢
generate.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
可以粘贴脚本? – 2009-09-17 20:31:53
因此'shell_gen.csh'回应“making/scratch/graphics/gif”(即“/”和“gif”之间没有任何内容)?你的脚本适合我(它回应“making/scratch/graphics/test1gif”)。 – 2009-09-18 00:59:38