I have two python scrips (direct.py and nat.py) and I would like to make a bash script to select which python to start based on my input.
Also, when manually running those py scripts I have input options (0...8,h and q). When press 'q' I have sys.exit().
eg:
./start.sh and output should be something like:
Chose your mode: (if type nat)
python3 nat.py
now python script is displayed and if press q, back to bash to chose option.
echothe options, usereadto get input and useswitch casedepends on input. – Siva Oct 23 '18 at 08:42readandswitch casein an infinitewhileloop? If needed, you would then probably need atrapto catchctrl-cproperly: https://unix.stackexchange.com/questions/42287/terminating-an-infinite-loop – Gohu Oct 23 '18 at 09:39