0%

Book Description

grep Pocket Reference is the first guide devoted to grep, the powerful Unix content-location utility. This handy book is ideal for system administrators, security professionals, developers, and others who want to learn more about grep and take new approaches with it -- for everything from mail filtering and system log management to malware analysis. With grep Pocket Reference, you will:

  • Learn methods for filtering large files for specific content
  • Acquire information not included in the current grep documentation
  • Get several tricks for using variants such as egrep
  • Keep key information about grep right at your fingertips

Find the answers you need about grep quickly and easily. If you're familiar with this utility, grep Pocket Reference will help you refresh your basic knowledge, understand rare situations, and work more efficiently. If you're new to grep, this book is the best way to get started.

Table of Contents

  1. 1. grep Pocket Reference
    1. Introduction
      1. Conventions Used in This Book
      2. Using Code Examples
      3. SafariĀ® Books Online
      4. Comments and Questions
      5. Acknowledgments
        1. From John Bambenek
        2. From Agnieszka Klus
    2. Conceptual Overview
    3. Introduction to Regular Expressions
      1. Quotation Marks and Regular Expressions
      2. Metacharacters
      3. POSIX Character Classes
      4. Crafting a Regular Expression
    4. grep Basics
    5. Basic Regular Expressions (grep or grep -G)
      1. Match Control
      2. General Output Control
      3. Output Line Prefix Control
      4. Context Line Control
      5. File and Directory Selection
      6. Other Options
    6. Extended Regular Expressions (egrep or grep -E)
    7. Fixed Strings (fgrep or grep -F)
    8. Perl-Style Regular Expressions (grep -P)
      1. Character Types
      2. Octal Searching
      3. Character Properties
      4. PCRE Options
    9. Introduction to grep-Relevant Environment Variables
    10. Choosing Between grep Types and Performance Considerations
      1. When to Use grep -E
      2. When to Use grep -F
      3. When to Use grep -P
      4. Performance Implications
    11. Advanced Tips and Tricks with grep
      1. Backreferences
      2. Binary File Searching
      3. Useful Recipes
        1. IP addresses
        2. MAC addresses
        3. Email addresses
        4. U.S.-based phone numbers
        5. Social Security numbers
        6. Credit card numbers
        7. Copyright-protected or confidential material
        8. Searching through large numbers of files
        9. Matching strings across multiple lines
    12. References
  2. Index
  3. About the Authors
  4. Copyright
18.222.155.58