Extra Regular Expression Wildcards Available in egrep

The egrep command is an extended version of grep that allows some regular expression wildcards that grep doesn’t allow. However, egrep does not support the braces {} wildcard to specify the number of occurrences. Sometimes the set of egrep regular expression wildcards are called extended regular expressions or full regular expressions. The syntax for egrep is the same as that for grep.

See Table 18.2 for other standard properties of the egrep and fgrep commands. fgrep is discussed in a later section of this chapter.

Table 18.2. Other Properties of the egrep and fgrep Commands
PropertySee page
Allows relative and absolute pathname arguments70
Processes either filename arguments OR standard input ...

Get Practical UNIX now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.