Просмотр исходного кода

Ensure grep tests run to completion

Xi Ruoyao 5 лет назад
Родитель
Сommit
1be33916ac
3 измененных файлов с 115 добавлено и 1 удалено
  1. 3 0
      chapter01/changelog.xml
  2. 1 1
      chapter06/grep.xml
  3. 111 0
      chapter06/grep.xml.orig

+ 3 - 0
chapter01/changelog.xml

@@ -44,6 +44,9 @@
     <listitem>
       <para>2018-08-12</para>
       <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - 确保 grep 测试完整运行。</para>
+        </listitem>
         <listitem>
           <para>[bdubbs] - 在第 6 章中以非特权用户身份运行 gcc 测试。</para>
         </listitem>

+ 1 - 1
chapter06/grep.xml

@@ -50,7 +50,7 @@
 
     <para>运行以下命令以测试编译结果:</para>
 
-<screen><userinput remap="test">make check</userinput></screen>
+<screen><userinput remap="test">make -k check</userinput></screen>
 
     <para>安装该软件包:</para>
 

+ 111 - 0
chapter06/grep.xml.orig

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-grep" role="wrap">
+  <?dbhtml filename="grep.html"?>
+
+  <sect1info condition="script">
+    <productname>grep</productname>
+    <productnumber>&grep-version;</productnumber>
+    <address>&grep-url;</address>
+  </sect1info>
+
+  <title>Grep-&grep-version;</title>
+
+  <indexterm zone="ch-system-grep">
+    <primary sortas="a-Grep">Grep</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>Grep 软件包包含在文件中进行搜索的程序。</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&grep-ch6-sbu;</seg>
+        <seg>&grep-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>安装 Grep</title>
+
+    <para>准备安装 Grep:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
+
+    <para>编译该软件包:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>运行以下命令以测试编译结果:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>安装该软件包:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-grep" role="content">
+    <title>Grep 的内容</title>
+
+    <segmentedlist>
+      <segtitle>安装的程序</segtitle>
+
+      <seglistitem>
+        <seg>egrep, fgrep, 以及 grep</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">简要描述</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="egrep">
+        <term><command>egrep</command></term>
+        <listitem>
+          <para>打印与扩展正则表达式匹配的行</para>
+          <indexterm zone="ch-system-grep egrep">
+            <primary sortas="b-egrep">egrep</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="fgrep">
+        <term><command>fgrep</command></term>
+        <listitem>
+          <para>打印与固定字符串匹配的行</para>
+          <indexterm zone="ch-system-grep fgrep">
+            <primary sortas="b-fgrep">fgrep</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="grep">
+        <term><command>grep</command></term>
+        <listitem>
+          <para>打印与基本正则表达式匹配的行</para>
+          <indexterm zone="ch-system-grep grep">
+            <primary sortas="b-grep">grep</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>