grep


Also found in: Dictionary, Thesaurus, Medical, Legal, Acronyms, Wikipedia.

grep

(tool, information science)
<tool> A Unix command for searching files for lines matching a given regular expression (RE). Named after the qed/ed editor subcommand "g/re/p", where re stands for a regular expression, to Globally search for the Regular Expression and Print the lines containing matches to it. There are two other variants, fgrep which searches only for fixed strings and egrep which accepts extended REs but is usually the fastest of the three.

Used by extension to mean "to look for something by pattern". When browsing through a large set of files, one may speak of "grepping around". "Grep the bulletin board for the system backup schedule, would you?" See also vgrep.

grep

(Global Regular Expression and Print) A Unix pattern matching utility that searches files for a string of text and outputs the line that contains the pattern. Grep came from ed, a Unix text editor, in which the command g/re/p meant "display all text in the file that matches this." That single function became a utility itself, available on all major platforms today. This is an example of the rich family of command line functions built into Unix long before Windows

The following real life example used grep to find occurrences of the text "xfiles.lst" within any .CMD files in the default folder. The results show the matching files and text. See Unix.


Grep Windows Example
The command grep "xfiles.lst" *.cmd looks for CMD files that contain the text xfiles.lst. Grep found NEWXMLM.CMD and WHATSNEW.CMD matching the text string.
References in periodicals archive ?
In this experiment, WordCount and Grep were combined into the same queue, and TeraSort was in a different queue.
14) O uso do grep e mais vantajoso tambem porque o aplicamos diretamente sobre o arquivo do corpus, ao passo que, em Python, temos de explicitamente abrir e fechar esse arquivo.
By Open Sourcing this, along with the awk and grep utilities, Caldera begins a process of making some of the original UNIX utilities, upon which the GNU/Linux system was modeled, available as reference sources.
The information about selected resources can be also acquired by grep in the main audit file (see: Fig.
com)-- The unique all-in-one SMS marketing system, GT Notify, designed and manufactured by Grep Tech Pte Ltd is now an integrated solution that is eligible for funding to SMEs in Singapore through SPRING's Innovation & Capability Voucher scheme.
We are excited that MapR has chosen to ship key end-user open source tools from Concurrent with MapR, including Multitool, which allows users to search, find and process data files across a Hadoop cluster similar to sed and grep in Unix.
b Asa mth greP Me are Dow with A spokesman for the Australian coastguard said: "We don't recommend manhandling sharks but this gentleman did a great job.
Examples of commands that can be monitored include "netstat -a | grep LISTEN" or other execution commands such as "/opt/servlet_engine/tomcate restart" ) -- Gather any output to STDOUT and STDERR -- Consolidate the output of the Execution and Content of files into a single compressed file -- Report output to customers.
From a management perspective, the MKS Toolkit for Developers contains hundreds of authentic UNIX utilities such as grep, df, du and ls, as well as ksh, csh and bash shells (enabling UNIX developers to immediately start using familiar scripts to manage UNIX as well as Windows environments).
Table 1: Description of Test Programs program # instr # taken # not-taken sfloat 7730261 111170 125382 ls 1207004 112180 91466 gcc 677017 61258 58096 cc 543900 50519 46536 chmod 492158 45812 42507 grep 491016 45672 42382 awk 490911 45524 42365 pack 486776 45159 42173
Grep and awk give you a 'fire and hope you aimed right' interface to finding what you are looking for, but Splunk's interface gives you a way to 'aim that bullet' once it leaves the chamber.