我正在运行一个脚本"example.sh“,它接受5个命令行参数。
这可以很好地工作:
./example.sh arg1 arg2 arg3 arg4 arg5
并返回一个文件result1.txt
现在,当我尝试在SGE集群上运行它时(使用或不使用"./"):
qsub ./example.sh arg1 arg2 arg3 arg4 arg5
这不会产生任何输出。
在example.sh.eXXXXXXX文件中,我得到:
arg1=1: Command not found.
arg2=2: Command not found.
...
and so on.
我不确定为什么它不能与qsub命令一起工作。我还插入了一个
#!/usr/bin/env bash
在我的脚本的顶部。我已经调整了一段时间,尝试了在stackoverflow和网络上找到的不同东西,但到目前为止还没有成功(我已经尝试了-S和-F标志)。任何建议都能为我指明正确的方向。
发布于 2017-06-10 05:51:01
qsub
不会接受这样的shell脚本参数,但这两个参数都可以工作:
1)将./example.sh arg1 arg2 arg3 arg4 arg5
放入另一个脚本中,如command.sh
,然后运行qsub command.sh
。
2)将完整的命令作为标准输入输入到qsub
中,例如:echo ./example.sh arg1 arg2 arg3 arg4 arg5 | qsub
。
https://stackoverflow.com/questions/43036507
复制相似问题