I have 50 shell scripts: proc_0.sh, proc_500.sh, proc_1000.sh...proc_25000.sh.
Each of them perform same operation but on different files.
I would like to execute all these shell scripts in a single master shell script, one after another.
Here is what I have tried so far:
#!/bin/bash/
cd $(pwd)
i=0
for i in {0..25000..500}
do
chmod +x proc_${i}.sh
bash proc_${i}.sh
done
exit
Now, I am not sure about this but it seems that these scripts are running in parallel or getting mixed up in some way. I say this because when I run a few of these scripts individually, they give correct results but not when run in the way mentioned above. It could also be that there might be a problem with the program these scripts are executing.
So, could anyone please tell me if this is the right way to run multiple shell scripts one after another? It would help me narrow down the problem.
Thanks
{0..25000..500}: is it{0..500..25000}that you wanted ? what aboutseq 0 25000 500?seqif you don't need it. It is not a build-in, it is slower, eats more resources and it is depricated.seq?