[prev] [index] [next]

The grep family

grep is one of a group of related filters using different kinds of pattern match:
  • grep uses a limited form of POSIX regular expressions (no + ? | or parentheses)
  • egrep (extended grep) implements the full regexp syntax
  • fgrep finds any of several (maybe even thousands of) fixed strings using an optimised algorithm.

grep's options like -i and -v are recognised by all family members.

The regexp or fgrep's fixed string list can be stored in a file and accessed with the -f option: fgrep -f magicwords data1