summaryrefslogtreecommitdiffhomepage
path: root/bench/cmdsub.sh
blob: 53fd401326cd6eba7b254e666322cd0b182eaf0c (plain)
1
2
3
4
5
6
7
8
#!/bin/sh
# $(builtin): the classic fork-per-substitution cost.
i=0
while [ $i -lt 20000 ]; do
    x=$(echo $i); y=$(printf '%05d' $i)
    i=$((i + 1))
done
echo $x $y