Hello all,
I doubt this is possible, but here goes:
In PHP, you can do the following
basically allowing you to test two variables in a case statement.
I really don't think this is possible but my script is getting unwieldy with massive "if - elseif" blocks.
Any idea one way or another if its possible to do similar in bash?
Thanks for your help
------------------------------------------
Somethings come from nothing, nothing seems to come from somethings - SFA - Guerilla
roycrom
I doubt this is possible, but here goes:
In PHP, you can do the following
Code:
switch(true) {
case ( "$TEST1" == "0" AND "$TEST2" == "0" ):
echo "both 0";
break;
case ( "$TEST1" == "0" AND "$TEST2" == "1" ):
echo "different";
break;
}
basically allowing you to test two variables in a case statement.
I really don't think this is possible but my script is getting unwieldy with massive "if - elseif" blocks.
Any idea one way or another if its possible to do similar in bash?
Thanks for your help
------------------------------------------
Somethings come from nothing, nothing seems to come from somethings - SFA - Guerilla
roycrom