[GRASS-dev] missing help for r.cats

Ivan Shmakov ivan at theory.asu.ru
Wed Feb 20 11:02:46 EST 2008


>>>>> Hamish  <hamish_b at yahoo.com> 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/) 



More information about the grass-dev mailing list