[519ee45] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
| 7 |
|
---|
| 8 | <sect1 id="ch-system-grep" role="wrap">
|
---|
| 9 | <?dbhtml filename="grep.html"?>
|
---|
| 10 |
|
---|
| 11 | <title>Grep-&grep-version;</title>
|
---|
| 12 |
|
---|
| 13 | <indexterm zone="ch-system-grep">
|
---|
| 14 | <primary sortas="a-Grep">Grep</primary>
|
---|
| 15 | </indexterm>
|
---|
| 16 |
|
---|
| 17 | <sect2 role="package">
|
---|
| 18 | <title/>
|
---|
| 19 |
|
---|
| 20 | <para>The Grep package contains programs for searching through files.</para>
|
---|
| 21 |
|
---|
| 22 | <segmentedlist>
|
---|
| 23 | <segtitle>&buildtime;</segtitle>
|
---|
| 24 | <segtitle>&diskspace;</segtitle>
|
---|
| 25 |
|
---|
| 26 | <seglistitem>
|
---|
| 27 | <seg>&grep-ch6-sbu;</seg>
|
---|
| 28 | <seg>&grep-ch6-du;</seg>
|
---|
| 29 | </seglistitem>
|
---|
| 30 | </segmentedlist>
|
---|
| 31 |
|
---|
| 32 | </sect2>
|
---|
| 33 |
|
---|
| 34 | <sect2 role="installation">
|
---|
| 35 | <title>Installation of Grep</title>
|
---|
| 36 |
|
---|
| 37 | <para>The current Grep package has many bugs, especially in the support of
|
---|
| 38 | multibyte locales. RedHat fixed some of them with the following patch:</para>
|
---|
| 39 |
|
---|
| 40 | <screen><userinput>patch -Np1 -i ../&grep-fixes-patch;</userinput></screen>
|
---|
| 41 |
|
---|
| 42 | <para>In order for the tests added by this patch to pass, the permissions for
|
---|
| 43 | the test file have to be changed:</para>
|
---|
| 44 |
|
---|
| 45 | <screen><userinput>chmod +x tests/fmbtest.sh</userinput></screen>
|
---|
| 46 |
|
---|
| 47 | <para>Prepare Grep for compilation:</para>
|
---|
| 48 |
|
---|
| 49 | <screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen>
|
---|
| 50 |
|
---|
| 51 | <para>Compile the package:</para>
|
---|
| 52 |
|
---|
| 53 | <screen><userinput>make</userinput></screen>
|
---|
| 54 |
|
---|
| 55 | <para>To test the results, issue:
|
---|
| 56 | <userinput>make check</userinput>.</para>
|
---|
| 57 |
|
---|
| 58 | <para>Install the package:</para>
|
---|
| 59 |
|
---|
| 60 | <screen><userinput>make install</userinput></screen>
|
---|
| 61 |
|
---|
| 62 | </sect2>
|
---|
| 63 |
|
---|
| 64 | <sect2 id="contents-grep" role="content">
|
---|
| 65 | <title>Contents of Grep</title>
|
---|
| 66 |
|
---|
| 67 | <segmentedlist>
|
---|
| 68 | <segtitle>Installed programs</segtitle>
|
---|
| 69 |
|
---|
| 70 | <seglistitem>
|
---|
| 71 | <seg>egrep (link to grep), fgrep (link to grep), and grep</seg>
|
---|
| 72 | </seglistitem>
|
---|
| 73 | </segmentedlist>
|
---|
| 74 |
|
---|
| 75 | <variablelist>
|
---|
| 76 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 77 | <?dbfo list-presentation="list"?>
|
---|
| 78 | <?dbhtml list-presentation="table"?>
|
---|
| 79 |
|
---|
| 80 | <varlistentry id="egrep">
|
---|
| 81 | <term><command>egrep</command></term>
|
---|
| 82 | <listitem>
|
---|
| 83 | <para>Prints lines matching an extended regular expression</para>
|
---|
| 84 | <indexterm zone="ch-system-grep egrep">
|
---|
| 85 | <primary sortas="b-egrep">egrep</primary>
|
---|
| 86 | </indexterm>
|
---|
| 87 | </listitem>
|
---|
| 88 | </varlistentry>
|
---|
| 89 |
|
---|
| 90 | <varlistentry id="fgrep">
|
---|
| 91 | <term><command>fgrep</command></term>
|
---|
| 92 | <listitem>
|
---|
| 93 | <para>Prints lines matching a list of fixed strings</para>
|
---|
| 94 | <indexterm zone="ch-system-grep fgrep">
|
---|
| 95 | <primary sortas="b-fgrep">fgrep</primary>
|
---|
| 96 | </indexterm>
|
---|
| 97 | </listitem>
|
---|
| 98 | </varlistentry>
|
---|
| 99 |
|
---|
| 100 | <varlistentry id="grep">
|
---|
| 101 | <term><command>grep</command></term>
|
---|
| 102 | <listitem>
|
---|
| 103 | <para>Prints lines matching a basic regular expression</para>
|
---|
| 104 | <indexterm zone="ch-system-grep grep">
|
---|
| 105 | <primary sortas="b-grep">grep</primary>
|
---|
| 106 | </indexterm>
|
---|
| 107 | </listitem>
|
---|
| 108 | </varlistentry>
|
---|
| 109 |
|
---|
| 110 | </variablelist>
|
---|
| 111 |
|
---|
| 112 | </sect2>
|
---|
| 113 |
|
---|
| 114 | </sect1>
|
---|