I have a bash script:
#! usr/bin/env bash# test bash script to call python scriptscd ~/pythonfor ((i = 1; i <= 2; i++)); do python3 test_0$i.py; donecd ~/bash
that pulls test_0x.py files from the python directory and runs them in order.test_01.py is a single print statement, whereas test_02 is a for loop.
I was expecting it to:
- navigate to ~/python
- run test_01.py
- run test_02.py
- navigate back to ~/bash
the bash script runs test_01.py, then test_01.py again, and only then test_02.py.is this some quirk of shell-scripts i am simply too green to anticipate, or is there something wrong with my — albeit very basic — code?
I am using an ubuntu terminal through windows subsystem for linux, if that affects things.