grepid: change usage to accept arbitrary grep arguments, require "where" param

This commit is contained in:
Josh Holtrop 2011-09-13 10:40:21 -04:00
parent cb3f4e43f2
commit 88483e4b2e

7
grepid
View File

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