|
grep is a command line utility that was originally written for use with the Unix operating system. Given a list of files or standard input to read, grep searches for lines of text that match one or many regular expressions, and outputs only the matching lines. This article or section does not adequately cite its references or sources. ...
Filiation of Unix and Unix-like systems Unix (officially trademarked as UNIX®) is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy. ...
The standard streams are a set of input and output channels featured in Unix and Unix-like operating systems, and provided by the standard I/O library (stdio. ...
In computing, a regular expression is a string that is used to describe or match a set of strings, according to certain syntax rules. ...
Function and usage
The name, "grep", derives from the command used to perform a similar operation, using the Unix text editor ed: The text editor ed was the original standard on the Unix operating system. ...
g/re/p which means "search globally for lines matching the regular expression, and print them". There are various command line switches available when using grep that modify this default behavior including printing lines which do not match, finding or excluding files to search, and annotating the output in various ways. There are also multiple, modern implementations of the classic Unix grep, each with a unique feature set. This is an example of a common grep usage: grep apple fruitlist.txt Grep would return, in this case, all of the lines in file fruitlist.txt with an instance of 'apple' in them. Keep in mind that grep would not return lines with 'Apple' (capital A) because by default grep is case sensitive. Like most Unix commands grep accepts flags which can be used to change this and many other behaviors. For example: grep -i apple fruitlist.txt This would return all lines with the words 'apple', 'Apple', 'apPLE', or any other mixing of capital and lower case. The option -e can also be used to declare multiple patterns for searching on the command line with some versions of grep.
Variations There are many derivatives of grep, for example agrep which stands for approximate grep to facilitate fuzzy string searching, fgrep for fixed pattern searches, and egrep for searches involving more sophisticated regular expression syntax. fgrep and egrep are typically the same program as grep, which behaves differently depending on the name by which it is invoked. Tcgrep is a rewrite of grep which uses Perl regular expression syntax. All these variations of grep have been ported to many computer operating systems. Agrep (Approximate grep) is a fuzzy string searching program, developed by Udi Manber and Sun Wu between 1988 and 1991, for use with the Unix operating system. ...
Fuzzy string searching is the name for a category of techniques for finding one or more substrings of a text that approximately match some given pattern string. ...
grep is a command line utility that was originally written for use with the Unix operating system. ...
grep is a command line utility that was originally written for use with the Unix operating system. ...
Many other commands contain the word "grep." pgrep, for instance, displays the processes whose names match a regular expression. pgrep is a command line utility initially written for use with the Solaris 7 operating systems and then ported to GNU/Linux. ...
In Perl, grep is a built-in function, which when provided both a regular expression (or a general code block) and a list, returns the elements of that list matched by the expression. In functional programming languages, this higher-order function is typically named "filter" instead. Wikibooks has a book on the topic of Perl Programming Perl is a dynamic programming language created by Larry Wall and first released in 1987. ...
In computing, a regular expression is a string that is used to describe or match a set of strings, according to certain syntax rules. ...
Functional programming is a programming paradigm that conceives computation as the evaluation of mathematical functions and avoids state and mutable data. ...
In mathematics and computer science, higher-order functions are functions which can take other functions as arguments, and may also return functions as results. ...
The Microsoft Windows platform provides a utility called "findstr" which approximates much of the functionality of "grep." Microsoft Corporation, (NASDAQ: MSFT, HKSE: 4338) is a multinational computer technology corporation with global annual revenue of US$44. ...
1. ...
Usage as a conversational verb As the name "grep" neatly fits the phonology of English, it is often used as a verb, meaning to search – usually, to search a known set of files, as one would with the grep utility. The direct object is the set of files searched: "Kibo grepped his Usenet spool for his name." Compare with google. Sometimes visual grep is used as a term meaning to look through text searching for something, in the manner of the grep program. Phonology (Greek phonÄ = voice/sound and logos = word/speech), is a subfield of linguistics which studies the sound system of a specific language (or languages). ...
The English language is a West Germanic language that originates in England. ...
This article or section is not written in the formal tone expected of an encyclopedia article. ...
Usenet (USEr NETwork) is a global, decentralized, distributed Internet discussion system that evolved from a general purpose UUCP architecture of the same name. ...
Look up google in Wiktionary, the free dictionary. ...
In December 2003, the Oxford English Dictionary Online added draft entries for "grep" as both a noun and a verb. The Oxford English Dictionary print set The Oxford English Dictionary (OED) is a dictionary published by the Oxford University Press (OUP), and is the most successful dictionary of the English language, (not to be confused with the one-volume Oxford Dictionary of English, formerly New Oxford Dictionary of English, of...
A common usage is the phrase "You can't grep dead trees" - meaning computerized documentation is better than printed documentation (paper is made from dead trees) because computers can search documents by using tools such as grep. The word "grep" has also become a synonym for regular expressions themselves. Many text and word processors now employ regular expression search features, which those applications will often refer to as a "grep tool" or "grep mode" in which one creates "grep patterns", causing confusion, especially in non-Unix environments.
egrep and fgrep Early variants of grep included egrep and fgrep. The former applies an extended regular expression syntax that was added to Unix after Ken Thompson's original regular expression implementation. The latter simply reads a set of fixed strings to search for from a file. These early variants are embodied in most modern grep implementations as simple command-line switches (e.g. -E and -F respectively in GNU grep). Kenneth Thompson redirects here. ...
The GNU logo, drawn by Etienne Suvasa The GNU Project was announced in 1983 by Richard Stallman. ...
See also Image File history File links This is a lossless scalable vector image. ...
This is a list of Unix programs. ...
In computing, a regular expression is a string that is used to describe or match a set of strings, according to certain syntax rules. ...
The Boyer-Moore string search algorithm is a particularly efficient string searching algorithm. ...
searchmonkey is a Gtk+ search utility originally written for use with the Unix operating system. ...
The title given to this article is incorrect due to technical limitations. ...
References - Alain Magloire (August, 2000). Grep: Searching for a Pattern. Iuniverse Inc. ISBN 0-595-10039-2.
- Andrew Hume. Grep wars: The strategic search initiative. In Peter Collinson, editor, Proceedings of the EUUG Spring 88 Conference, pages 237–245, Buntingford, UK, 1988. European UNIX User Group.
- Raymond, Eric. grep. Jargon File. Retrieved on 2006-06-29.
Eric S. Raymond (FISL 6. ...
Year 2006 (MMVI) was a common year starting on Sunday (link displays full 2006 calendar) of the Gregorian calendar. ...
is the 180th day of the year (181st in leap years) in the Gregorian calendar. ...
External links |