I have a bash file in which I execute a python code in a for loop several times. I want to set a timeout so that if the python code takes more than a certain time then we go to the next iteration. How can I add timeout to my bash code line when compiling and running the python file? This is the current line I use for running the python code:
python hw.py
I want to have something like this:
python hw.py timeout=120