var=0;while true; do var=$((var+1)); echo $var; sleep 1; done;

you should see:
1
2
3
4
5
6

admin