accept an optional parameter for target directory

This commit is contained in:
Josh Holtrop committed 2011-03-04 13:45:35 -05:00
1 parent 673d209206
commit 5461246c3a
1 file changed
+6 -2
+6 -2
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}