diff --git a/README.md b/README.md index db2e196..cc06e0b 100755 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ A collection of simple Bash scripts. 1. [Randomfile.sh](scripts/randomfile.sh): create unique file/folder automatically with date and time stamp 1. [Random-emoji.sh](scripts/random-emoji.sh): print ramdom emojis 1. [pomodoro.sh](scripts/pomodoro.sh): a simple pomodoro app written in bash +1. [options.sh](scripts/options.sh): a simple way to select specific option ## Programming diff --git a/scripts/options.sh b/scripts/options.sh new file mode 100755 index 0000000..0d74600 --- /dev/null +++ b/scripts/options.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +OPTIONS="Hello Quit" +select opt in $OPTIONS; do + if [ "$opt" = "Quit" ]; then + echo done + exit + elif [ "$opt" = "Hello" ]; then + echo Hello World + else + clear + echo bad option + fi +done