last step to make script fully work
Code:
#!/bin/bash -e |
Remove ; bash
Actually, most terminal emulators including gnome-terminal have option -e. So you could just Code:
gnome-terminal -e python3 game.py Code:
# Option “-e” is deprecated and might be removed in a later version of gnome-terminal. Code:
gnome-terminal -- python3 game.py |
Quote:
|
I amended my post. See above.
|
Quote:
|
Then I don't understand what you're seeking for.
|
Quote:
Quote:
in other words, once game.py no longer is in use, which means closed, I want the terminal's child (which is the terminal) to be closed. |
Try this
Code:
gnome-terminal -- read -p 'Hit Enter ' junk |
Quote:
Code:
# Error: Failed to execute child process “read”: Failed to execve: No such file or directory |
Quote:
Code:
gnome-terminal -- sh -c 'read -p "Hit Enter " _' Quote:
|
Quote:
Code:
gnome-terminal -- sh -c "python3 game.py" 'read -p "Hit Enter " _' |
Its unclear what you're trying to do, and why you're calling bash and gnome-terminal from a shell script in the first place. But seems to me you should just add
"python3 game.py" to the second line of "script.sh" and be done with it. Otherise I'd try... Code:
#!/bin/bash |
All times are GMT -5. The time now is 08:49 AM. |