#!/bin/ksh
#set -x
if [ $# -lt 2 ]; then
echo "usage: fn [flags] dir pattern"
echo ""
echo "fn runs a find on
and then runs"
echo "egrep on the files"
exit 1
fi
flags="$1"
if [ "${flags#-}" != "$flags" ]; then
dir="$2"
pattern="$3"
else
flags=""
dir="$1"
pattern="$2"
fi
find $dir -print | egrep $flags "$pattern"