grep.xml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. <sect1 id="ch-system-grep" role="wrap">
  8. <?dbhtml filename="grep.html"?>
  9. <title>Grep-&grep-version;</title>
  10. <indexterm zone="ch-system-grep">
  11. <primary sortas="a-Grep">Grep</primary>
  12. </indexterm>
  13. <sect2 role="package">
  14. <title/>
  15. <para>The Grep package contains programs for searching through files.</para>
  16. <segmentedlist>
  17. <segtitle>&buildtime;</segtitle>
  18. <segtitle>&diskspace;</segtitle>
  19. <seglistitem>
  20. <seg>0.1 SBU</seg>
  21. <seg>4.5 MB</seg>
  22. </seglistitem>
  23. </segmentedlist>
  24. <segmentedlist>
  25. <segtitle>&dependencies;</segtitle>
  26. <seglistitem>
  27. <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Make,
  28. Sed, and Texinfo</seg>
  29. </seglistitem>
  30. </segmentedlist>
  31. </sect2>
  32. <sect2 role="installation">
  33. <title>Installation of Grep</title>
  34. <para>The current Grep package has many bugs, especially in the support of
  35. multibyte locales. RedHat fixed some of them with the following patch:</para>
  36. <screen><userinput>patch -Np1 -i ../&grep-fixes-patch;</userinput></screen>
  37. <para>In order for the tests added by this patch to pass, the permissions for
  38. the test file have to be changed:</para>
  39. <screen><userinput>chmod +x tests/fmbtest.sh</userinput></screen>
  40. <para>Prepare Grep for compilation:</para>
  41. <screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen>
  42. <para>Compile the package:</para>
  43. <screen><userinput>make</userinput></screen>
  44. <para>To test the results, issue:
  45. <userinput>make check</userinput>.</para>
  46. <para>Install the package:</para>
  47. <screen><userinput>make install</userinput></screen>
  48. </sect2>
  49. <sect2 id="contents-grep" role="content">
  50. <title>Contents of Grep</title>
  51. <segmentedlist>
  52. <segtitle>Installed programs</segtitle>
  53. <seglistitem>
  54. <seg>egrep (link to grep), fgrep (link to grep), and grep</seg>
  55. </seglistitem>
  56. </segmentedlist>
  57. <variablelist>
  58. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  59. <?dbfo list-presentation="list"?>
  60. <?dbhtml list-presentation="table"?>
  61. <varlistentry id="egrep">
  62. <term><command>egrep</command></term>
  63. <listitem>
  64. <para>Prints lines matching an extended regular expression</para>
  65. <indexterm zone="ch-system-grep egrep">
  66. <primary sortas="b-egrep">egrep</primary>
  67. </indexterm>
  68. </listitem>
  69. </varlistentry>
  70. <varlistentry id="fgrep">
  71. <term><command>fgrep</command></term>
  72. <listitem>
  73. <para>Prints lines matching a list of fixed strings</para>
  74. <indexterm zone="ch-system-grep fgrep">
  75. <primary sortas="b-fgrep">fgrep</primary>
  76. </indexterm>
  77. </listitem>
  78. </varlistentry>
  79. <varlistentry id="grep">
  80. <term><command>grep</command></term>
  81. <listitem>
  82. <para>Prints lines matching a basic regular expression</para>
  83. <indexterm zone="ch-system-grep grep">
  84. <primary sortas="b-grep">grep</primary>
  85. </indexterm>
  86. </listitem>
  87. </varlistentry>
  88. </variablelist>
  89. </sect2>
  90. </sect1>