Thread
:
Using variable in case statement
View Single Post
#
2
(
permalink
)
05-10-2008
guruparan18
Registered User
Join Date: May 2008
Location: India
Posts: 21
Try this
Quote:
bash-2.03$ b=[1,2,3,4]
bash-2.03$ case $ans in
> $b) echo $ans ;;
> x) break ;;
> *) echo "Error"
> esac
It should work.
guruparan18
View Public Profile
Visit guruparan18's homepage!
Find all posts by guruparan18