grep.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-grep" role="wrap">
  8. <?dbhtml filename="grep.html"?>
  9. <sect1info condition="script">
  10. <productname>grep</productname>
  11. <productnumber>&grep-version;</productnumber>
  12. <address>&grep-url;</address>
  13. </sect1info>
  14. <title>Grep-&grep-version;</title>
  15. <indexterm zone="ch-system-grep">
  16. <primary sortas="a-Grep">Grep</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Grep package contains programs for searching through files.</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&grep-ch6-sbu;</seg>
  26. <seg>&grep-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>Installation of Grep</title>
  32. <para>The current Grep package has many bugs, especially in the support of
  33. multibyte locales. The following consolidated patch from Debian fixes some of them,
  34. improves the number of individual tests which are passed, and much improves the
  35. speed in UTF-8 locales:</para>
  36. <screen><userinput remap="pre">patch -Np1 -i ../&grep-debian-patch;</userinput></screen>
  37. <para>Upstream have fixed some of the documentation, and changed some of the
  38. tests and the expected results in the newest test scripts. This means that
  39. not so many of the individual tests fail:</para>
  40. <screen><userinput remap="pre">patch -Np1 -i ../&grep-fixes-patch;</userinput></screen>
  41. <para>Prepare Grep for compilation:</para>
  42. <screen><userinput remap="configure">./configure --prefix=/usr \
  43. --bindir=/bin \
  44. --without-included-regex</userinput></screen>
  45. <variablelist>
  46. <title>The meaning of the configure switch:</title>
  47. <varlistentry>
  48. <term><parameter>--without-included-regex</parameter></term>
  49. <listitem>
  50. <para>The configure check for glibc's regex library is broken when
  51. building against glibc-2.8. This switch forces the use of glibc's
  52. regex library.</para>
  53. </listitem>
  54. </varlistentry>
  55. </variablelist>
  56. <para>Compile the package:</para>
  57. <screen><userinput remap="make">make</userinput></screen>
  58. <para>To test the results, issue:</para>
  59. <screen><userinput remap="test">make check || true</userinput></screen>
  60. <para>There are known test failures in the <command>foad1.sh</command> and
  61. <command>fmbtest.sh</command> tests. The &quot;|| true&quot; construct is
  62. used to avoid build automated build scripts failing due to the test failures.
  63. A good run will show 2 failures from 14 tests, but if you look at the
  64. output you will see in excess of forty individual tests which failed - these
  65. are all in the new tests added since the previous version.</para>
  66. <para>Install the package:</para>
  67. <screen><userinput remap="install">make install</userinput></screen>
  68. </sect2>
  69. <sect2 id="contents-grep" role="content">
  70. <title>Contents of Grep</title>
  71. <segmentedlist>
  72. <segtitle>Installed programs</segtitle>
  73. <seglistitem>
  74. <seg>egrep, fgrep, and grep</seg>
  75. </seglistitem>
  76. </segmentedlist>
  77. <variablelist>
  78. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  79. <?dbfo list-presentation="list"?>
  80. <?dbhtml list-presentation="table"?>
  81. <varlistentry id="egrep">
  82. <term><command>egrep</command></term>
  83. <listitem>
  84. <para>Prints lines matching an extended regular expression</para>
  85. <indexterm zone="ch-system-grep egrep">
  86. <primary sortas="b-egrep">egrep</primary>
  87. </indexterm>
  88. </listitem>
  89. </varlistentry>
  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. <varlistentry id="grep">
  100. <term><command>grep</command></term>
  101. <listitem>
  102. <para>Prints lines matching a basic regular expression</para>
  103. <indexterm zone="ch-system-grep grep">
  104. <primary sortas="b-grep">grep</primary>
  105. </indexterm>
  106. </listitem>
  107. </varlistentry>
  108. </variablelist>
  109. </sect2>
  110. </sect1>