<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=32v_1m_grep</id>
		<title>32v 1m grep - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://gunkies.org/index.php?action=history&amp;feed=atom&amp;title=32v_1m_grep"/>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=32v_1m_grep&amp;action=history"/>
		<updated>2026-05-12T04:00:21Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.1</generator>

	<entry>
		<id>https://gunkies.org/w/index.php?title=32v_1m_grep&amp;diff=6970&amp;oldid=prev</id>
		<title>Neozeed: New page: GREP(1)             UNIX Programmer's Manual              GREP(1)    == NAME ==      grep, egrep, fgrep - search a file for a pattern  == SYNOPSIS ==      grep [ option ] ...  expression [...</title>
		<link rel="alternate" type="text/html" href="https://gunkies.org/w/index.php?title=32v_1m_grep&amp;diff=6970&amp;oldid=prev"/>
				<updated>2009-10-26T14:15:09Z</updated>
		
		<summary type="html">&lt;p&gt;New page: GREP(1)             UNIX Programmer&amp;#039;s Manual              GREP(1)    == NAME ==      grep, egrep, fgrep - search a file for a pattern  == SYNOPSIS ==      grep [ option ] ...  expression [...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;GREP(1)             UNIX Programmer's Manual              GREP(1)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== NAME ==&lt;br /&gt;
     grep, egrep, fgrep - search a file for a pattern&lt;br /&gt;
&lt;br /&gt;
== SYNOPSIS ==&lt;br /&gt;
     grep [ option ] ...  expression [ file ] ...&lt;br /&gt;
&lt;br /&gt;
     egrep [ option ] ...  [ expression ] [ file ] ...&lt;br /&gt;
&lt;br /&gt;
     fgrep [ option ] ...  [ strings ] [ file ]&lt;br /&gt;
&lt;br /&gt;
== DESCRIPTION ==&lt;br /&gt;
     Commands of the _g_r_e_p family search the input _f_i_l_e_s (standard&lt;br /&gt;
     input default) for lines matching a pattern.  Normally, each&lt;br /&gt;
     line found is copied to the standard output.  _G_r_e_p patterns&lt;br /&gt;
     are limited regular expressions in the style of _e_d(1); it&lt;br /&gt;
     uses a compact nondeterministic algorithm.  _E_g_r_e_p patterns&lt;br /&gt;
     are full regular expressions; it uses a fast deterministic&lt;br /&gt;
     algorithm that sometimes needs exponential space.  _F_g_r_e_p&lt;br /&gt;
     patterns are fixed strings; it is fast and compact.  The&lt;br /&gt;
     following options are recognized.&lt;br /&gt;
&lt;br /&gt;
     -v   All lines but those matching are printed.&lt;br /&gt;
&lt;br /&gt;
     -x   (Exact) only lines matched in their entirety are&lt;br /&gt;
          printed (_f_g_r_e_p only).&lt;br /&gt;
&lt;br /&gt;
     -c   Only a count of matching lines is printed.&lt;br /&gt;
&lt;br /&gt;
     -l   The names of files with matching lines are listed&lt;br /&gt;
          (once) separated by newlines.&lt;br /&gt;
&lt;br /&gt;
     -n   Each line is preceded by its relative line number in&lt;br /&gt;
          the file.&lt;br /&gt;
&lt;br /&gt;
     -b   Each line is preceded by the block number on which it&lt;br /&gt;
          was found.  This is sometimes useful in locating disk&lt;br /&gt;
          block numbers by context.&lt;br /&gt;
&lt;br /&gt;
     -e _e_x_p_r_e_s_s_i_o_n&lt;br /&gt;
          Same as a simple _e_x_p_r_e_s_s_i_o_n argument, but useful when&lt;br /&gt;
          the _e_x_p_r_e_s_s_i_o_n begins with a -.&lt;br /&gt;
&lt;br /&gt;
     -f _f_i_l_e&lt;br /&gt;
          The regular expression (_e_g_r_e_p) or string list (_f_g_r_e_p)&lt;br /&gt;
          is taken from the _f_i_l_e.&lt;br /&gt;
&lt;br /&gt;
     In all cases the file name is shown if there is more than&lt;br /&gt;
     one input file.  Care should be taken when using the charac-&lt;br /&gt;
     ters $ * [ ^ | ( ) and \ in the _e_x_p_r_e_s_s_i_o_n as they are also&lt;br /&gt;
     meaningful to the Shell.  It is safest to enclose the entire&lt;br /&gt;
     _e_x_p_r_e_s_s_i_o_n argument in single quotes ' '.&lt;br /&gt;
&lt;br /&gt;
     _F_g_r_e_p searches for lines that contain one of the (newline-&lt;br /&gt;
     separated) _s_t_r_i_n_g_s.&lt;br /&gt;
&lt;br /&gt;
     _E_g_r_e_p accepts extended regular expressions.  In the follow-&lt;br /&gt;
     ing description `character' excludes newline:&lt;br /&gt;
&lt;br /&gt;
          A \ followed by a single character other than newline&lt;br /&gt;
          matches that character.&lt;br /&gt;
&lt;br /&gt;
          The character ^ ($) matches the beginning (end) of a&lt;br /&gt;
          line.&lt;br /&gt;
&lt;br /&gt;
          A . matches any character.&lt;br /&gt;
&lt;br /&gt;
          A single character not otherwise endowed with special&lt;br /&gt;
          meaning matches that character.&lt;br /&gt;
&lt;br /&gt;
          A string enclosed in brackets [] matches any single&lt;br /&gt;
          character from the string.  Ranges of ASCII character&lt;br /&gt;
          codes may be abbreviated as in `a-z0-9'.  A ] may occur&lt;br /&gt;
          only as the first character of the string.  A literal -&lt;br /&gt;
          must be placed where it can't be mistaken as a range&lt;br /&gt;
          indicator.&lt;br /&gt;
&lt;br /&gt;
          A regular expression followed by * (+, ?) matches a&lt;br /&gt;
          sequence of 0 or more (1 or more, 0 or 1) matches of&lt;br /&gt;
          the regular expression.&lt;br /&gt;
&lt;br /&gt;
          Two regular expressions concatenated match a match of&lt;br /&gt;
          the first followed by a match of the second.&lt;br /&gt;
&lt;br /&gt;
          Two regular expressions separated by | or newline match&lt;br /&gt;
          either a match for the first or a match for the second.&lt;br /&gt;
&lt;br /&gt;
          A regular expression enclosed in parentheses matches a&lt;br /&gt;
          match for the regular expression.&lt;br /&gt;
&lt;br /&gt;
     The order of precedence of operators at the same parenthesis&lt;br /&gt;
     level is [] then *+? then concatenation then | and newline.&lt;br /&gt;
&lt;br /&gt;
== SEE ALSO ==&lt;br /&gt;
     [[32v 1m ed|ed(1)]], [[32v 1m sed|sed(1)]], [[32v 1m sh|sh(1)]]&lt;br /&gt;
&lt;br /&gt;
== DIAGNOSTICS ==&lt;br /&gt;
     Exit status is 0 if any matches are found, 1 if none, 2 for&lt;br /&gt;
     syntax errors or inaccessible files.&lt;br /&gt;
&lt;br /&gt;
== BUGS ==&lt;br /&gt;
     Ideally there should be only one _g_r_e_p, but we don't know a&lt;br /&gt;
     single algorithm that spans a wide enough range of space-&lt;br /&gt;
     time tradeoffs.&lt;br /&gt;
&lt;br /&gt;
     Lines are limited to 256 characters; longer lines are trun-&lt;br /&gt;
     cated.&lt;br /&gt;
&lt;br /&gt;
[[Category:32v man section 1]]&lt;/div&gt;</summary>
		<author><name>Neozeed</name></author>	</entry>

	</feed>