#!/bin/sh # Execute this script with one argument: the directory containing your page files. find "$@" -name '*.page' | while read file; do num_found=$(./constraints_parser -5 -f "$file" | wc -l) if [ $num_found -gt 0 ] then echo $num_found $file fi done