Chapter 7. Pattern Matching


A number of Linux text-processing utilities let you search for, and in some cases change, text patterns rather than fixed strings. These utilities include the editing programs ed, ex, vi, and sed; the gawk programming language; and the commands grep and egrep. Text patterns (called regular expressions in computer science literature) contain normal characters mixed with special characters (called metacharacters).

This chapter presents the following topics:

  • Filenames versus patterns

  • Description of metacharacters

  • List of metacharacters available to each program

  • Examples

For more information on regular expressions, see the O'Reilly book Mastering Regular Expressions.



Linux in a Nutshell
Linux in a Nutshell
ISBN: 0596154488
EAN: 2147483647
Year: 2004
Pages: 147

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net