I agree with all that, but in this special case, I think that
I should also note that the OP mentioned using if, but was surprised/confused by the behavior of case, which is why that's what we've been focusing on.
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms