Install Grep by running the following commands:
root:grep-2.4.2# CPPFLAGS=-Dre_max_failures=re_max_failures2 \
> ./configure --prefix=/usr --disable-nls
root:grep-2.4.2# make LDFLAGS=-static
root:grep-2.4.2# make prefix=$LFS/usr install
The grep package contains the egrep, fgrep and grep programs.
egrep prints lines from files matching an extended regular expression pattern.
fgrep prints lines from files matching a list of fixed strings, separated by newlines, any of which is to be matched.
grep prints lines from files matching a basic regular expression pattern.