5.9. Installing Grep

5.9.1. Installation of Grep

Install Grep by running the following commands:


export CPPFLAGS=-Dre_max_failures=re_max_failures2 &&
./configure --prefix=$LFS/usr --disable-nls &&
unset CPPFLAGS &&
make LDFLAGS=-static &&
make install

5.9.2. Contents

The grep package contains the egrep, fgrep and grep programs.

5.9.3. Description

5.9.3.1. egrep

egrep prints lines from files matching an extended regular expression pattern.

5.9.3.2. fgrep

fgrep prints lines from files matching a list of fixed strings, separated by newlines, any of which is to be matched.

5.9.3.3. grep

grep prints lines from files matching a basic regular expression pattern.