How can I check in Bash if the Enter key has been pressed? I'm using the read command:
read -p "Please press ENTER" var
Firstly, check whether the exit status is normal ($?
should be 0).
Secondly, check that $var
equals ""
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With