sed.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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-sed" role="wrap">
  8. <?dbhtml filename="sed.html"?>
  9. <sect1info condition="script">
  10. <productname>sed</productname>
  11. <productnumber>&sed-version;</productnumber>
  12. <address>&sed-url;</address>
  13. </sect1info>
  14. <title>Sed-&sed-version;</title>
  15. <indexterm zone="ch-system-sed">
  16. <primary sortas="a-Sed">Sed</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>Sed 软件包包含一个流编辑器。</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&sed-ch6-sbu;</seg>
  26. <seg>&sed-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>安装 Sed</title>
  32. <para>首先修复 LFS 环境中的一个问题,并删除一个失败的测试:</para>
  33. <screen><userinput remap="pre">sed -i 's/usr/tools/' build-aux/help2man
  34. sed -i 's/testsuite.panic-tests.sh//' Makefile.in</userinput></screen>
  35. <para>准备安装 Sed:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
  37. <!--
  38. <variablelist>
  39. <title>The meaning of the new configure option:</title>
  40. <varlistentry>
  41. <term><parameter>-i -htmldir</parameter></term>
  42. <listitem>
  43. <para>This sets the installation directory for the HTML documentation.</para>
  44. </listitem>
  45. </varlistentry>
  46. </variablelist>
  47. -->
  48. <para>编译该软件包,并生成 HTML 文档:</para>
  49. <screen><userinput remap="make">make
  50. make html</userinput></screen>
  51. <para>运行以下命令以测试编译结果:</para>
  52. <screen><userinput remap="test">make check</userinput></screen>
  53. <para>安装该软件包及其文档:</para>
  54. <screen><userinput remap="install">make install
  55. install -d -m755 /usr/share/doc/sed-&sed-version;
  56. install -m644 doc/sed.html /usr/share/doc/sed-&sed-version;</userinput></screen>
  57. </sect2>
  58. <sect2 id="contents-sed" role="content">
  59. <title>Sed 的内容</title>
  60. <segmentedlist>
  61. <segtitle>安装的程序</segtitle>
  62. <segtitle>安装的目录</segtitle>
  63. <seglistitem>
  64. <seg>sed</seg>
  65. <seg>/usr/share/doc/sed-&sed-version;</seg>
  66. </seglistitem>
  67. </segmentedlist>
  68. <variablelist>
  69. <bridgehead renderas="sect3">简要描述</bridgehead>
  70. <?dbfo list-presentation="list"?>
  71. <?dbhtml list-presentation="table"?>
  72. <varlistentry id="sed">
  73. <term><command>sed</command></term>
  74. <listitem>
  75. <para>一次性过滤和转换文本文件</para>
  76. <indexterm zone="ch-system-sed sed">
  77. <primary sortas="b-sed">sed</primary>
  78. </indexterm>
  79. </listitem>
  80. </varlistentry>
  81. </variablelist>
  82. </sect2>
  83. </sect1>