#!/bin/bash define="$1" where="$2" if [[ "x$where" == "x" ]]; then where=. fi exec grep --exclude-dir .svn --color=auto -R "define *\\<${define}\\>" ${where}