What I want to do, is to make a bash script, which at one point starts another terminal with a command in it, and at the same time, keeps the normal program flow in the main thread.
I could do the first part by using
xterm -e python something.py
But the main program flow also pauses, until the newly opened window is closed.
For suppose,
xterm -e python something.py
echo "Wait for sometime"
sleep 7
kill something.py
So, here i want to kill the something.py opened in a new window, automatically after 7 seconds. Any way, that could be implemented in bash. Or in Python program itself, to close itself after 7 seconds.
Replace your line with this:
Note the
&— it asks the shell to execute the command in background and resume execution of the script.