• Many commands support the regular expression syntax, but the most commonly used is the command grep, which is designed to display lines from a file or files matching a given regular expression.

  • There are multiple ways to call grep to change its behavior:


    Treat the pattern as a basic regular expression.


    Treat the pattern as an extended regular expression. Same as grep –E.


    Treat the pattern as a list of fixed strings, any of which may be matched. Same as grep –F.

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.