Possible Duplicate:
How can I add numbers in a bash script
I have a variable that changes value in a for loop:
for i in {1..10..1}
do
while ((count < max+1))
do
echo $count >> /directory/outfile_${max}.txt
((count++))
done
max=$max+100
done
The ten outfiles should have the names "outfile_100.txt", "outfile_200.txt" etc..
But what happens is that they become like "outfile_100+100+100....txt"
Is it in how I resize max
?