【发布时间】:2010-11-29 07:04:02
【问题描述】:
所以我有 .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
【问题讨论】:
-
所以
shell_gen.csh回显“制作/scratch/graphics/gif”(即“/”和“gif”之间没有任何内容)?你的脚本对我有用(它与“制作/scratch/graphics/test1gif”相呼应)。