#!/bin/sh # 200 background jobs, then one wait. i=0 while [ $i -lt 200 ]; do ( : ) & i=$((i + 1)) done wait echo "$i"