Is there a Korn shell data type equivlent to Pascal sets?
Posted on 2013-01-09
I know! It's just wishful thinking. Just thought I'd put it out there.
I have a situation for which, if I could use Pascal, I'd define a set type and declare a set variable which I could reference in a construct similar to the following...
SOMETHING = (me, myself, I)
SET = set of SOMETHING
if THIS in THAT; then...
My Pascal is a little rusty, but...
What I'm trying to do is determine whether one number is included in a set of other numbers. So far, all I've come up with is the case statement:
case $NUMBER in
1|5|9|21|34) Do something or do nothing, as it were...