about the while loop problem, i'm not sure you can really call it a bug. it's how i'd expect it to behave :P for example:

Code:
while %a <= 12)


the second operand in that condition is the string "12)". there's no opening ( so that closing parenthesis is treated as plaintext

now when you use <= with non-numbers, it no longer performs a numeric comparison, but rather a comparison based on the order of the ASCII values of the two operands. 2 is seen as greater than 12) because the ASCII value of 2 is greater than the ASCII value of the first character of 12)

the same thing occurs with the rest of your examples. should this be considered a bug? i don't think so :P a similar situation arises with evaluation brackets, if you have no opening evaluation bracket, a closing one is plaintext:

Code:
//echo -a hi! ] ] ]



"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde