I knew how to write that bash once, but I can’t figure it out anymore.
As the title says, it should be script aimed at running on a Linux server.
My goal is to do those commands without having it typed again and again.
(I’m chaining the input files in each run.)
bsprun -npes 1 ./a.out file1.txt file2.txt
bsprun -npes 2 ./a.out file1.txt file2.txt
bsprun -npes 3 ./a.out file1.txt file2.txt
bsprun -npes 4 ./a.out file1.txt file2.txt
bsprun -npes 5 ./a.out file1.txt file2.txt
bsprun -npes 6 ./a.out file1.txt file2.txt
bsprun -npes 7 ./a.out file1.txt file2.txt
bsprun -npes 8 ./a.out file1.txt file2.txt
Actually, after reading your description a bit more closely, perhaps you want this:
chmod +xthe script then call it likeIf your input files change according to a pattern we could make the script a bit smarter but it is unclear what your file names look like.
To get the exact output you posted, put it in a loop like: