#!/usr/bin/awk -f $* length < 12 {print; n++} prevfile != FILENAME {print n, "short lines in this file" , FILENAME; prevfile=FILENAME;n=0}