grep - Execute grep command
rgrep - Execute recursive grep command
grep "expression files..." rgrep "expression" "base-path" "file-mask"
grep executes the grep(1) command with the command line set by the %grep-com(5) variable and the user supplied expression and file list files.... The output of the command is piped into the *grep* buffer ready for the get-next-line(2) command to step through all matched lines. The syntax from the grep output must be setup using add-next-line(2).
rgrep is simpler to grep in that it uses grep(1) to search for all occurrences of expression, but rgrep also uses find(1) to search for expression in all files matching the file-mask in all directories from base-path down.
grep is a macro defined in tools.emf.
grep(1) must be executable on the system before grep or rgrep can function, find(1) must also be available for rgrep to work. The find(1) command is defined by variable %find-com(5), the default when not defined is find.
The grep command is generally set up in the startup files as follows:-
; ; setup the next-error stuff including grep and compiling ; set-variable $line-template "[0-9]+" set-variable $file-template "[a-zA-Z:]*[0-9a-zA-Z\_.]+" ; ; Definitions for GNU grep utility. ; set-variable %grep-com "grep -n " 0 add-next-line "*grep*" add-next-line "*grep*" "%f:%l:"
Copyright (c) 1998-2006 JASSPA
Last Modified: 2004/03/17
Generated On: 2006/10/07