|
Popular Articles
Latest Articles
![]()
Main Menu
|
UNIX Support: Recursively GREPI've always had two major problems with the UNIX "grep" command. First, the "grep" command will gladly read a non-text file, and thus produce garbage if the grep pattern was found. Second, the "grep" command can be used to search in all the files in a single directory, but the command will not recursively search all sub-directories. As a result, I wrote a Perl script, called recursive grep or "regrep.pl", to resolve these issues. Here is the syntax to run this script.
The first argument is the only required argument for the value to search or grep for. All the remaining arguments are the directories where to start to recursively search for text file to grep. The default path is the current directory. You can download this Perl script here, or you can copy-n-paste from here: by Phil B.
|