#!/bin/sh # # gf - grepfind - for grepping matching filesz! # # By Ted Percival , 2007. # http://creativecommons.org/licenses/publicdomain/ set -e [ $# -ge 2 ] || exit 1 if [ $# -eq 3 ]; then dir="$1" shift else dir=. fi set -x find "$dir" -name "$1" -exec grep -Hn "$2" {} \; set +x # vim: ts=4 sw=4 et tw=80