

Hiya!

Rgrep is adapted from a script written by James Dean Palmer. Rgrep stands for recursive grep, and that is what it does. Rgrep recursively descends into the
*current* directory, searching *each* file for the pattern you provided as the argument. For example, the command

rgrep.pl abra

will cause grep to recursively descend the current directory and search all files in the current directory and its subdirectories for the string abra. Note that you can also use regular expressions in place of simple strings. But be careful: your regexps will pass through both shell & perl!

Now, I know that grep does all this and more, but I like perl's regexps, and I got sick of the way grep handles regexps.

When you try to run rgrep.pl, you may get the following message:

bash: ./mydiff.pl: /usr/local/bin/perl: bad interpreter: No such file or directory

This simply means that the path to perl interpreter given in rgrep.pl is not correct for your system (although it is correct on *my* system). To fix this, edit the first line of rgrep. It currently says:

#!/usr/local/bin/perl -w

change it to
#!<path to your perl interpreter> -w

And you are all set. For example, if your perl interpreter is /usr/bin/perl, you would change the line to

#!/usr/bin/perl -w

You can find out where your perl interpreter is by doing

which perl

or

whereis perl

whereis perl may return more information that you may have bargained for.

