variabel perubahan bash saat loop

i=1
while read x; do
   i=$(($i + 1))
   echo $i
done <<<$(find tmp -type f)
echo $i
AttractivePenguin