<?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>
