1

I am running these commands in perl script with purpose

  1. Open a linux terminal
  2. Run script xbrecoverBoard.sh and rest_board.sh in that terminal
gnome-terminal -x sh -c "./xbrecoverBoard.sh && ./rest_board.sh";
gnome-terminal -x sh -c "./xbrecoverBoard.sh;./rest_board.sh";

For some reason a terminal opens and closes very quick that seems not doing anything although it doesn't give any error in the main terminal that I run perl script. Please help me to resolve the issue and show me how to hold that open terminal from command line.

0

For simplicity sake, try:

./xbrecoverBoard.sh

If it crashes, try:

./xbrecoverBoard.sh &

This could be something as simple as a bogus line of code in the perl script.

0

To keep the terminal open, hand it over to an interactive shell after you have run your commands:

gnome-terminal -x sh -c "./xbrecoverBoard.sh;./rest_board.sh; exec bash";

Here, I used Bash shell as an example. Now, the terminal won't close since the Shell is using it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.