I have a bash that executes some commands in the terminal and at the end of that bash, I want it to display a message saying "Press ENTER to exit..." (with no timeout, i.e. the bash should wait indefinitely for the ENTER key to be pressed). After the ENTER key has been pressed, I want the bash to exit and the terminal to close automatically.
I tried
Code:
#!/bin/bash
# some commands...
read -p "Press the ENTER key to exit ... " Enter
exit
but that doesn't work.
How can I make it work right, please?