Basically I want shell scripting to run something like this:
time python DoublePendulum.py 1 1 1
time python DoublePendulum.py 1 2 1
time python DoublePendulum.py 1 4 1
time python DoublePendulum.py 1 8 1
time python DoublePendulum.py 1 16 1
(the program produces specially named png files as output)
Assuming that you’ll want to set up some terminating condition for your loop:
Explanation:
increment: The variable that increments itself by multiplying by 2 each timeterminating: Variable to keep track of when to terminate your loop. (Alternatively, you can do it for how many times you want the loop to run by implementing a separate counter that increments by 1 each time.while [[ "$increment" -lt "$terminating" ]]: Run while terminating condition hasn’t been reached.time python DoublePendulum.py 1 "$increment" 1: Substitute your increment in.increment=$((increment * 2)): Increase your increment.