gpt4 book ai didi

linux - 直接从 SLURM/SGE 调用系统命令

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:31:25 25 4
gpt4 key购买 nike

我想在没有 .sh 脚本的情况下直接从 sbatch (slurm/sge) 命令调用系统命令 (kat hist)。不确定这样的事情是否可能?


这是我目前正在做的:

"sbatch -p %s -n %s -t %s ./kat_reads_call.sh %s %s %s %s/filter_10xReads.py %s %s" % arg_list

.kat_reads.sh 就是这样做的:

#!/bin/bash
kat hist -o $1 -m $2 -t $3 <($4 -1 $5 -2 $6)

目标是这样的:

"sbatch -p %s -n %s -t %s kat hist -o %s -m %s -t %s <(%s -1 %s -2 %s)" % arg_list

这是我收到的错误:

sbatch: error: This does not look like a batch script.  The first
sbatch: error: line must start with #! followed by the path to an interpreter.
sbatch: error: For instance: #!/bin/sh

最佳答案

检查sbatch--wrap参数。你需要这样的东西:

"sbatch -p %s -n %s -t %s --wrap \"kat hist -o %s -m %s -t %s <(%s -1 %s -2 %s)\"" % arg_list

应用正确的转义序列,因为我不知道它是什么语言。

关于linux - 直接从 SLURM/SGE 调用系统命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57825845/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com