compare two variable value in unix

dear all

i had two variable in my script.
var1 and var2

var1= 10 ( it will part of date op ) Fri Aug 8 10:05:09 IST 2008
var2=9 ( it will op of ls -ltr and time part of it.)

now i want to compare of them and want to do some task if both are are not same.

kindly let me know possible way...

rgd
jaydeep