You are doing numeric comparisons... -gt
201010111200 your number
2147483648 the maximum value for numeric operations that POSIX requires
In other words, you are seeing undefined behavior. ksh happens to work; bash does not -
neither one is required to work. awk,perl,ruby, etc, handle up to 15 digits of precision.
I believe that introducing the ">" won't solve the problem. Funnily enough, the construct works with bash under SunOS 5.10. I'm merely interested whether anyone else encountered the problem.
Jim and hergp: I take the point about the 32/64 bit issue (maxima: 2147483648/9223372036854775807); thanks for the information. It's just that my script - using bash - was failing on the 5.9 and working on the 5.10 system).