In better news, I found a reasonably portable way for a shellscript to read a single (one-byte) character without waiting for the Enter key:

readkey() {
stty -icanon -echo
dd bs=1 count=1 2>/dev/null
stty icanon echo
}
variable=$( readkey )

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!