Browse Source

interactive

master
pvincent 4 days ago
parent
commit
b387db0603
  1. 6
      interactive.bash

6
interactive.bash

@ -1,10 +1,12 @@
#!/usr/bin/env bash
read -p 'press [ENTER] to continue:' < /dev/tty
stty /dev/tty
read -p 'press [ENTER] to continue:'
echo REPLY=$REPLY
choices=( one two three)
select choice in "${choices[@]}"; do
[[ -n $choice ]] && break
done < /dev/tty
done
echo "choice is: $choice"
Loading…
Cancel
Save