运行多个文件作业用一个sbatch
我想运行n个文件(n个作业),这些文件(n个作业)在我的pwd中的n个文件夹中:
Folder_1
contains file_1
Folder_2
contains file_2
|
|
|
Folder_N
contains file_N
对于一个file_1,我只需要做:sbatch script.sh ./folder1/file_1即可。
但是,有没有办法使运行n个文件的循环如下:
for i in range(N):
sbatch script.sh ./folder_i/file_i
I want to run N files (N jobs) that are inside N folders that are in my pwd such :
Folder_1
contains file_1
Folder_2
contains file_2
|
|
|
Folder_N
contains file_N
For one file_1 i just have to do : sbatch script.sh ./folder1/file_1.
But is there a way to make a loop for running the N files like :
for i in range(N):
sbatch script.sh ./folder_i/file_i
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
创建一个bash文件:
使其通过此链接 https: //www.andrewcbancroft.com/blog/musings/make-bash-script-executable/
它运行。
Create a bash file as such :
make it executable via this link https://www.andrewcbancroft.com/blog/musings/make-bash-script-executable/
and it runs.
我找到了一个解决方案,我只想在这里分享
I found a solution i just want to share it here,