I know this question has been already asked & answered, but the solution I found listens for space and enter:
while [ "$key" != '' ]; do read -n1 -s -r key done
Is there a way (in bash) to make a script that will wait only for the space bar?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community