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 ""
.