I have a Bash shell script in which I would like to pause execution until the user presses a key. In DOS, this is easily accomplished with the \"pause\" command. Is there a
read -n1 is not portable. A portable way to do the same might be:
read -n1
( trap "stty $(stty -g;stty -icanon)" EXIT LC_ALL=C dd bs=1 count=1 >/dev/null 2>&1 )
Besides using read, for just a press ENTER to continue prompt you could do:
read
ENTER
sed -n q