summaryrefslogtreecommitdiffhomepage
path: root/bench/testloop.sh
blob: 4b02c13c15d8c6b43ed0e8fd036f0e7e97a25a0c (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
# [ ] in a loop: the test builtin, with argument vectors and lookups.
i=0
n=0
while [ $i -lt 100000 ]; do
    if [ "$i" != 7 ] && [ -n "$i" ]; then n=$((n + 1)); fi
    i=$((i + 1))
done
echo $n