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