'unary operator expected' is the error when you use a binary operator with only a single operand.
This means that either t2 or t1 is empty. To cause an empty variable to not disappear, use default notation ${VARIABLE:-DEFAULT}
to give them a default value:
if [ ${t2:-0} -ge ${t1:-0} ]; then
R Samuel Klatchko
2010-01-21 00:09:26