Bash – Wait until gnome-terminal ends

bashgnome-terminalpythonscriptingshell

I'm trying to implement a script who runs four terminal window in parallel using this function gnome-terminal -e sh -c "python scraper.py".
I would like to know if there's a way to wait until each script ends and the run other few commmands.
Hope someone will help.

Best Answer

gnome-terminal 3.27.1 introduced the --wait option, which solves this issue. So just run:

$ gnome-terminal --wait -e sh -c "python scraper.py"
Related Question