>>>>> Hamish  <[EMAIL PROTECTED]> writes:

 >> If you're doing that from the shell, it needs two backslashes:

 >> grep -rI r\\.cats *

 >> or quotes:

 >> grep -rI 'r\.cats' *

 >> so that grep actually "sees" a backslash.

 >> Or just use "grep -F" or "fgrep" for searching for fixed strings.

 > true. another annoying flase positive thing since the move to SVN is
 > that duplicate '/.svn/' entries pop up and must be filtered out with
 > 'grep -v'.

        GNU grep has `--include', so I often use something like the
        following:

$ grep -rF --include='*.[ch]' G_foo lib/ raster/ 

$ grep -rF --include=\*.html  g.bar ./ 

        Unfortunately, there's no way to skip directories matching a
        wildcard (e. g.: --exclude=.svn), at least as of GNU grep 2.5.1.

        The `-l' option could be useful as well, e. g.:

$ less $(grep -rlF --include='*.[ch]' G_foo raster/) 

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to