accept an optional parameter for target directory

This commit is contained in:
Josh Holtrop 2011-03-04 13:45:35 -05:00
parent 673d209206
commit 5461246c3a

8
grepid
View File

@ -1,4 +1,8 @@
#!/bin/sh
#!/bin/bash
id="$1"
exec grep --exclude-dir .svn --color=auto -R '\<'"${id}"'\>' .
where="$2"
if [[ "$where" == "" ]]; then
where=.
fi
exec grep --exclude-dir .svn --color=auto -R '\<'"${id}"'\>' ${where}