I am running some commands and I am trying to get an output into a variable. I am having problem when I try to put that value in while loop, it says integer value expected. What's the best way to accomplish this
remaining=$(symclone -sid XXX -f Clone_test query | grep MB | awk '{print $2}')
y=1
while [ "$remaining" -gt "$y" ]
do
echo "$remaining MB's to be copied....." >> mylog
sleep 10
remaining=$(symclone -sid XXX -f Clone_test query | grep MB | awk '{print $2}')
done