Skip to Main Content
Linux in a Nutshell, Fourth Edition
book

Linux in a Nutshell, Fourth Edition

by Ellen Siever, Stephen Figgins, Aaron Weber
June 2003
Beginner to intermediate content levelBeginner to intermediate
944 pages
43h 1m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, Fourth Edition

Metacharacters

The following characters have special meaning in search patterns:

Character

Action

.

Match any single character except newline.

*

Match any number (or none) of the single character that immediately precedes it. The preceding character also can be a regular expression (e.g., since . (dot) means any character, .* means match any number of any character—except newlines).

^

Match the beginning of the line or string.

$

Match the end of the line or string.

[ ]

Match any one of the enclosed characters. A hyphen (-) indicates a range of consecutive characters. A circumflex (^) as the first character in the brackets reverses the sense: it matches any one character not in the list. A hyphen or close bracket (]) as the first character is treated as a member of the list. All other metacharacters are treated as members of the list.

[^ ]

Match anything except enclosed characters.

\{ n,m \}

Match a range of occurrences of the single character that immediately precedes it. The preceding character also can be a regular expression. \{ n \} matches exactly n occurrences, \{ n ,\} matches at least n occurrences, and \{ n,m \} matches any number of occurrences between n and m.

{ n,m }

Like \{ n,m \}. Available in grep by default and in gawk with the -Wre-interval option.

\

Turn off the special meaning of the character that follows.

\( \)

Save the matched text enclosed between \( and \) in a special holding space. Up to nine patterns can be saved ...

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

Linux in a Nutshell, 6th Edition

Linux in a Nutshell, 6th Edition

Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
Linux in Action

Linux in Action

David Clinton
Hands-On System Programming with Linux

Hands-On System Programming with Linux

Kaiwan N. Billimoria, Tigran Aivazian
Embedded Linux for Developers

Embedded Linux for Developers

Alexandru Vaduva, Alex González, Chris Simmonds

Publisher Resources

ISBN: 0596004826