#!/bin/sh for f in $(seq 120) ; do (echo "(and"; grep -v '^(and$\|^)$' "$1" | perm; echo ")") > out echo -n . ./run -n out 2>&1 | tee log | grep 'assertion failed' && break tail log done