Shell脚本中的输入参数

时间:2020-10-26 16:40:30

标签: shell csh

这是我用来运行vdb.txt并生成cov_urg_report的Shell脚本:

#!/usr/bin/csh

urg -full64 -f ./vdb.txt -report ./cov_urg_report -format both -show tests

但是,上面的脚本只能在vdb.txt的同一目录中运行,并且cov_urg_report也将在vdb.txt的同一目录中生成。我想使脚本可以在不同目录中运行,并且用户可以指定要在其中生成cov_urg_report的位置。我尝试使用如下所示的方法,但最终仍会在vdb.txt的同一目录中生成cov_urg_report。

#!/usr/bin/csh

urg -full64 -f $1/vdb.txt -report $2/cov_urg_report -format both -show tests

0 个答案:

没有答案
相关问题