A toy example:
I want to run the following commands sequentially
python generate.py 1
python simulate.py 1
python generate.py 2
python simulate.py 2
...
python generate.py 100
python simulate.py 100
Given the large number of commands, I'd like to use a for loop along the lines
for i in {1..100}; do \
python generate.py $i; python simulate.py $i; \
done
It's very important for the jobs to run one after the next. Am I doing it correctly?
&&
to prevent the second running if the first fails. – User112638726 yesterday