while loop problem

I have following code that is not working that how it should work

paste $newlogsize $apachelogsize  | while read n a 

do

if [  $a > $n ]

then 
sudo rm -rf $apachelogsize
sudo touch $apachelogsize

sudo ls -l filename |awk '{print $5}' >> $apachelogsize

echo "new size" $n
echo "old size" $a

fi
done

Now problem this while condition run every time,
Actually.And i want to run only when $a is grater then $n.But $a and $n have multiple values thats why i am using loop. and $a and $n are coming for a simple text file.
can any one tell simple solution

You need $a and $n to be numeric values of the size of a file. I do not see were you set $newlogsize prior to the loop. So the value may be zero every time you start the scripts and inside the loop you again do not set the value for $newlogsize, so it may stay zero for ever.

i have fixed it

Before it was

if [ $a > $n ]

I have fixed like this

if [ $a -gt $n ]