Using case and arrays together in bash – unix.stackexchange.com

Is it possible, to check, if a variable is contained inside an array, using case? I would like to do something like ARR=( opt1 opt2 opt3 ); case $1 in $ARR) echo "Option is contained in ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Using case and arrays together in bash – unix.stackexchange.com"