Kubuntu 21.04 - How to tell bash "Press Enter to exit"?
by Snugbug from LinuxQuestions.org on (#5KKJ0)
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
exitbut that doesn't work.
How can I make it work right, please?
I tried
Code:#!/bin/bash
# some commands...
read -p "Press the ENTER key to exit ... " Enter
exitbut that doesn't work.
How can I make it work right, please?