I've tried Googling a lot I am still not able to find solution
rm -y zoznam
tomatch=1000000000
treshold=10
okvalue=`expr "$tomatch" / 100 * "$treshold"`
while read hostname sum size znak
do
while [ "$tomatch" -gt "$okvalue" ]
do
if [ "$tomatch" -gt "$size" ]
then
echo $hostname >> zoznam
tomatch=`expr "$tomatch" - "$size"`
fi
done
done < weeklysize
I get line 8: [: : integer expression expected please help
$okvaluehave? It seems to me that it is not an integer.set -xv. This will turn on debugging, and will help you see what values are in yourifstatement. I suspect that$sizeis not what you think it is.