From 04a80d552203beb6b84ad109a6cd59a6b0b3ba6a Mon Sep 17 00:00:00 2001 From: pvincent Date: Thu, 30 Oct 2025 15:29:08 +0400 Subject: [PATCH] interactive --- interactive.bash | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interactive.bash b/interactive.bash index 9aea60a..09644a7 100755 --- a/interactive.bash +++ b/interactive.bash @@ -2,3 +2,9 @@ read -p 'press [ENTER] to continue:' < /dev/tty echo REPLY=$REPLY + +choices=( one two three) +select choice in "${choices[@]}"; do + [[ -n $choice ]] && break +done +echo "choice is: $choice"