#!/bin/sh # getopts over a short option string, 4000 times through the same words. i=0 while [ $i -lt 12000 ]; do OPTIND=1 set -- -a -b -c value while getopts abc: o; do :; done i=$((i + 1)) done echo "$i $OPTIND"