Is there an "in" operator in bash/bourne? – unix.stackexchange.com

something like this: if [ "$1" in ("cat","dog","mouse") ]; then echo "dollar 1 is either a cat or a dog or a mouse" fi It's obviously a much shorter statement compared to say using several "or" ...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

Artikel Terkait

0 Comment to "Is there an "in" operator in bash/bourne? – unix.stackexchange.com"