6.27. Grep-2.5.4

The Grep package contains programs for searching through files.

Approximate build time: 0.1 SBU
Required disk space: 7.3 MB

6.27.1. Installation of Grep

The current Grep package has many bugs, especially in the support of multibyte locales. The following consolidated patch from Debian fixes some of them, improves the number of individual tests which are passed, and much improves the speed in UTF-8 locales:

patch -Np1 -i ../grep-2.5.4-debian_fixes-1.patch

Prepare Grep for compilation:

./configure --prefix=/usr \
    --bindir=/bin \
    --without-included-regex

The meaning of the configure switch:

--without-included-regex

The configure check for Glibc's regex library is broken when building against Glibc-2.11.1. This switch forces the use of Glibc's regex library.

Compile the package:

make

To test the results, issue:

make check || true

There are known test failures in the fmbtest.sh tests. The "|| true" construct is used to avoid automated build scripts failing due to the test failures. A good run will show 1 failure from 14 tests, although the test failure will detail 2 failed sub-tests.

Install the package:

make install

6.27.2. Contents of Grep

Installed programs: egrep, fgrep, and grep

Short Descriptions

egrep

Prints lines matching an extended regular expression

fgrep

Prints lines matching a list of fixed strings

grep

Prints lines matching a basic regular expression