1

[SOLVED] If loop in bash with multiple conditions

view story
linux-howto

http://forums.fedoraforum.org – In python this would be easy: Code: if test_var in ["a","b","c"]: print "Yes" ...but is there a way to do the same in bash? Something like: Code: if [ "$TEST" == "a" || "b" || "c"  ]; then echo "Yes"; fi ...but obviously, that doesn't work, you'd have to do: Code: if [ "$TEST" == "a" ] || [ "$TEST" == "b" ] || [ "$TEST" == "c" ]; then echo "Yes"; fi (HowTos)