3

I have an automated bash script that I run with the pantheon-terminal -e command:

pantheon-terminal -e my_script.sh

At the end of the task, it prints out a summary of the results.

I'd like to have the pantheon-terminal remain open and visible so I can check the results.

I've already tested the following solutions, but without results:

 pantheon-terminal -e "my_script.sh ; read"
 pantheon-terminal -e "my_script.sh ; bash"

Thanks in advance for your help.

EDIT
Finally I've found the solution.
It's enough to insert the follow command at the end of the bash script (without trying to concatenate more commands in the pantheon-terminal -e option):

read -p "press any key to exit"
1
  • 2
    If you found the answer, write an answer yourself and mark it as solved Apr 16, 2016 at 1:54

1 Answer 1

2

Put this line where you want the script to pause and wait for you:

read -p "Press any key to exit"

read will display the quoted prompt with a trailing newline and wait for your feedback.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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