grep.xml 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 --bindir=/bin</userinput></screen>
  43. <para>Compile the package:</para>
  44. <screen><userinput remap="make">make</userinput></screen>
  45. <para>To test the results, issue:</para>
  46. <screen><userinput remap="test">make check || true</userinput></screen>
  47. <para>There are known test failures in the <command>foad1.sh</command> and
  48. <command>fmbtest.sh</command> tests. The &quot;|| true&quot; construct is
  49. used to avoid build automated build scripts failing due to the test failures.
  50. A good run will show 2 failures from 14 tests, but if you look at the
  51. output you will see in excess of forty individual tests which failed - these
  52. are all in the new tests added since the previous version.</para>
  53. <para>Install the package:</para>
  54. <screen><userinput remap="install">make install</userinput></screen>
  55. </sect2>
  56. <sect2 id="contents-grep" role="content">
  57. <title>Contents of Grep</title>
  58. <segmentedlist>
  59. <segtitle>Installed programs</segtitle>
  60. <seglistitem>
  61. <seg>egrep, fgrep, and grep</seg>
  62. </seglistitem>
  63. </segmentedlist>
  64. <variablelist>
  65. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  66. <?dbfo list-presentation="list"?>
  67. <?dbhtml list-presentation="table"?>
  68. <varlistentry id="egrep">
  69. <term><command>egrep</command></term>
  70. <listitem>
  71. <para>Prints lines matching an extended regular expression</para>
  72. <indexterm zone="ch-system-grep egrep">
  73. <primary sortas="b-egrep">egrep</primary>
  74. </indexterm>
  75. </listitem>
  76. </varlistentry>
  77. <varlistentry id="fgrep">
  78. <term><command>fgrep</command></term>
  79. <listitem>
  80. <para>Prints lines matching a list of fixed strings</para>
  81. <indexterm zone="ch-system-grep fgrep">
  82. <primary sortas="b-fgrep">fgrep</primary>
  83. </indexterm>
  84. </listitem>
  85. </varlistentry>
  86. <varlistentry id="grep">
  87. <term><command>grep</command></term>
  88. <listitem>
  89. <para>Prints lines matching a basic regular expression</para>
  90. <indexterm zone="ch-system-grep grep">
  91. <primary sortas="b-grep">grep</primary>
  92. </indexterm>
  93. </listitem>
  94. </varlistentry>
  95. </variablelist>
  96. </sect2>
  97. </sect1>