Skip to Main Content
UNIX® Shells by Example, Third Edition
book

UNIX® Shells by Example, Third Edition

by Ellie Quigley
October 2001
Intermediate to advanced content levelIntermediate to advanced
1040 pages
22h 50m
English
Pearson
Content preview from UNIX® Shells by Example, Third Edition

3.5. egrep (Extended grep)

The main advantage of using egrep is that additional regular expression metacharacters (see Table 3.4) have been added to the set provided by grep. The \(\) and \{\}, however, are not allowed. (See GNU grep –E if using Linux.)

Table 3.4. egrep's Regular Expression Metacharacters
Metacharacter Function Example What It Matches
^ Beginning-of-line anchor '^love' Matches all lines beginning with love.
$ End-of-line anchor 'love$' Matches all lines ending with love.
. Matches one character 'l..e' Matches lines containing an l, followed by two characters, followed by an e.
* Matches zero or more characters '*love' Matches lines with zero or more spaces of the preceding characters followed by the pattern love.
[ ] Matches one ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

UNIX® Shells by Example Fourth Edition

UNIX® Shells by Example Fourth Edition

Ellie Quigley
Storage Area Networks For Dummies®

Storage Area Networks For Dummies®

Christopher Poelker, Alex Nikitin

Publisher Resources

ISBN: 013066538XPurchase book