grep.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?xml version="1.0" encoding="UTF-8"?>
  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>Grep 软件包包含在文件中进行搜索的程序。</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>安装 Grep</title>
  32. <para>准备安装 Grep:</para>
  33. <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
  34. <para>编译该软件包:</para>
  35. <screen><userinput remap="make">make</userinput></screen>
  36. <para>运行以下命令以测试编译结果:</para>
  37. <screen><userinput remap="test">make -k check</userinput></screen>
  38. <para>安装该软件包:</para>
  39. <screen><userinput remap="install">make install</userinput></screen>
  40. </sect2>
  41. <sect2 id="contents-grep" role="content">
  42. <title>Grep 的内容</title>
  43. <segmentedlist>
  44. <segtitle>安装的程序</segtitle>
  45. <seglistitem>
  46. <seg>egrep, fgrep, 以及 grep</seg>
  47. </seglistitem>
  48. </segmentedlist>
  49. <variablelist>
  50. <bridgehead renderas="sect3">简要描述</bridgehead>
  51. <?dbfo list-presentation="list"?>
  52. <?dbhtml list-presentation="table"?>
  53. <varlistentry id="egrep">
  54. <term><command>egrep</command></term>
  55. <listitem>
  56. <para>打印与扩展正则表达式匹配的行</para>
  57. <indexterm zone="ch-system-grep egrep">
  58. <primary sortas="b-egrep">egrep</primary>
  59. </indexterm>
  60. </listitem>
  61. </varlistentry>
  62. <varlistentry id="fgrep">
  63. <term><command>fgrep</command></term>
  64. <listitem>
  65. <para>打印与固定字符串匹配的行</para>
  66. <indexterm zone="ch-system-grep fgrep">
  67. <primary sortas="b-fgrep">fgrep</primary>
  68. </indexterm>
  69. </listitem>
  70. </varlistentry>
  71. <varlistentry id="grep">
  72. <term><command>grep</command></term>
  73. <listitem>
  74. <para>打印与基本正则表达式匹配的行</para>
  75. <indexterm zone="ch-system-grep grep">
  76. <primary sortas="b-grep">grep</primary>
  77. </indexterm>
  78. </listitem>
  79. </varlistentry>
  80. </variablelist>
  81. </sect2>
  82. </sect1>