Linux From Scratch
Prev | Chapter 5. Preparing the LFS system | Next

# Installing Grep

## 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`

## Contents

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

## Description

### egrep

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

### fgrep

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

### grep

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

Prev | Home | Next
Installing GCC | Up | Installing Gzip