2

I want to be able to completely close termite from within a bash script. I have something like this:

while true; do read -n 1 -s result case $result in [c]* ) exit 0;; esac done 

And I want hitting c to close termite.

1 Answer 1

4

Execute your command with exec command to replace your bash with your script and when your script interpret exit command it will close your terminal.

Run your command like: exec ./myscript.sh

NOTE: Your script must have execute permission.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.