Item Details

Print View

Effective Awk Programming

Arnold Robbins
Format
Book
Published
Sebastopol [Calif.] : O'Reilly, 2001.
Edition
3rd ed
Language
English
ISBN
0596000707
Contents
  • I. Awk Language and gawk 1
  • 1. Getting Started with awk 3
  • How to Run awk Programs 4
  • Datafiles for the Examples 10
  • An Example with Two Rules 13
  • A More Complex Example 14
  • awk Statements Versus Lines 15
  • Other Features of AWK 17
  • When to Use AWK 17
  • 2. Regular Expressions 19
  • How to Use Regular Expressions 19
  • Escape Sequences 21
  • Regular Expression Operators 23
  • Using Character Lists 26
  • gawk-Specific Regexp Operators 28
  • Case Sensitivity in Matching 29
  • How Much Text Matches? 31
  • Using Dynamic Regexps 31
  • 3. Reading Input Files 33
  • How Input Is Split into Records 33
  • Examining Fields 36
  • Non-constant Field Numbers 38
  • Changing the Contents of a Field 39
  • Specifying How Fields Are Separated 41
  • Reading Fixed-Width Data 46
  • Multiple-Line Records 48
  • Explicit Input with getline 51
  • 4. Printing Output 58
  • Print Statement 58
  • Examples of print Statements 59
  • Output Separators 60
  • Controlling Numeric Output with print 61
  • Using printf Statements for Fancier Printing 62
  • Redirecting Output of print and printf 68
  • Special Filenames in gawk 70
  • Closing Input and Output Redirections 74
  • 5. Expressions 78
  • Constant Expressions 79
  • Using Regular Expression Constants 81
  • Variables 82
  • Conversion of Strings and Numbers 84
  • Arithmetic Operators 85
  • String Concatenation 87
  • Assignment Expressions 88
  • Increment and Decrement Operators 92
  • True and False in awk 93
  • Variable Typing and Comparison Expressions 94
  • Boolean Expressions 97
  • Conditional Expressions 99
  • Function Calls 99
  • Operator Precedence (How Operators Nest) 101
  • 6. Patterns, Actions, and Variables 103
  • Pattern Elements 103
  • Using Shell Variables in Programs 109
  • Actions 110
  • Control Statements in Actions 111
  • Built-in Variables 120
  • 7. Arrays in AWK 129
  • Introduction to Arrays 130
  • Referring to an Array Element 132
  • Assigning Array Elements 133
  • Basic Array Example 133
  • Scanning All Elements of an Array 134
  • Delete Statement 135
  • Using Numbers to Subscript Arrays 136
  • Using Uninitialized Variables as Subscripts 137
  • Multidimensional Arrays 138
  • Scanning Multidimensional Arrays 139
  • Sorting Array Values and Indices with gawk 140
  • 8. Functions 142
  • Built-in Functions 142
  • User-Defined Functions 166
  • 9. Internationalization with GAWK 174
  • Internationalization and Localization 174
  • GNU gettext 175
  • Internationalizing awk Programs 177
  • Translating AWK Programs 179
  • A Simple Internationalization Example 182
  • GAWK Can Speak Your Language 183
  • 10. Advanced Features of gawk 185
  • Allowing Nondecimal Input Data 185
  • Two-Way Communications with Another Process 186
  • Using gawk for Network Programming 188
  • Using gawk with BSD Portals 189
  • Profiling Your AWK Programs 190
  • 11. Running awk and GAWK 194
  • Invoking AWK 194
  • Command-Line Options 195
  • Other Command-Line Arguments 200
  • AWKPATH Environment Variable 201
  • Obsolete Options and/or Features 202
  • Known Bugs in GAWK 203
  • II. Using awk and GAWK 205
  • 12. A Library of awk Functions 207
  • Naming Library Function Global Variables 208
  • General Programming 210
  • Datafile Management 218
  • Processing Command-Line Options 222
  • Reading the User Database 228
  • Reading the Group Database 232
  • 13. Practical awk Programs 237
  • Running the Example Programs 237
  • Reinventing Wheels for Fun and Profit 238
  • A Grab Bag of awk Programs 259
  • 14. Internetworking with GAWK 281
  • Networking with GAWK 281
  • Some Applications and Techniques 305
  • Related Links 323
  • A. Evolution of the AWK Language 327
  • B. Installing GAWK 337
  • C. Implementation Notes 350.
Description
xxiv, 421 p. : ill. ; 24 cm.
Notes
Includes index.
Technical Details
  • Access in Virgo Classic
  • Staff View

    LEADER 04841pam a22003254a 4500
    001 u3735058
    003 SIRSI
    005 20010620174550.0
    008 010509s2001 caua 001 0 eng
    010
      
      
    a| 2001034634
    020
      
      
    a| 0596000707
    035
      
      
    a| (Sirsi) i0596000707
    035
      
      
    a| (OCoLC)46975168
    040
      
      
    a| DLC c| DLC d| NhCcYBP d| MvI
    042
      
      
    a| pcc
    050
    0
    0
    a| QA76.73.A95 b| R63 2001
    082
    0
    0
    a| 005.13/3 2| 21
    090
      
      
    a| SCIENG/QA76.73.A95 b| R63 2001
    100
    1
      
    a| Robbins, Arnold.
    245
    1
    0
    a| Effective awk programming / c| Arnold Robbins.
    250
      
      
    a| 3rd ed.
    260
      
      
    a| Sebastopol [Calif.] : b| O'Reilly, c| 2001.
    300
      
      
    a| xxiv, 421 p. : b| ill. ; c| 24 cm.
    500
      
      
    a| Includes index.
    505
    0
    0
    g| I. t| Awk Language and gawk g| 1 -- g| 1. t| Getting Started with awk g| 3 -- t| How to Run awk Programs g| 4 -- t| Datafiles for the Examples g| 10 -- t| An Example with Two Rules g| 13 -- t| A More Complex Example g| 14 -- t| awk Statements Versus Lines g| 15 -- t| Other Features of AWK g| 17 -- t| When to Use AWK g| 17 -- g| 2. t| Regular Expressions g| 19 -- t| How to Use Regular Expressions g| 19 -- t| Escape Sequences g| 21 -- t| Regular Expression Operators g| 23 -- t| Using Character Lists g| 26 -- t| gawk-Specific Regexp Operators g| 28 -- t| Case Sensitivity in Matching g| 29 -- t| How Much Text Matches? g| 31 -- t| Using Dynamic Regexps g| 31 -- g| 3. t| Reading Input Files g| 33 -- t| How Input Is Split into Records g| 33 -- t| Examining Fields g| 36 -- t| Non-constant Field Numbers g| 38 -- t| Changing the Contents of a Field g| 39 -- t| Specifying How Fields Are Separated g| 41 -- t| Reading Fixed-Width Data g| 46 -- t| Multiple-Line Records g| 48 -- t| Explicit Input with getline g| 51 -- g| 4. t| Printing Output g| 58 -- t| Print Statement g| 58 -- t| Examples of print Statements g| 59 -- t| Output Separators g| 60 -- t| Controlling Numeric Output with print g| 61 -- t| Using printf Statements for Fancier Printing g| 62 -- t| Redirecting Output of print and printf g| 68 -- t| Special Filenames in gawk g| 70 -- t| Closing Input and Output Redirections g| 74 -- g| 5. t| Expressions g| 78 -- t| Constant Expressions g| 79 -- t| Using Regular Expression Constants g| 81 -- t| Variables g| 82 -- t| Conversion of Strings and Numbers g| 84 -- t| Arithmetic Operators g| 85 -- t| String Concatenation g| 87 -- t| Assignment Expressions g| 88 -- t| Increment and Decrement Operators g| 92 -- t| True and False in awk g| 93 -- t| Variable Typing and Comparison Expressions g| 94 -- t| Boolean Expressions g| 97 -- t| Conditional Expressions g| 99 -- t| Function Calls g| 99 -- t| Operator Precedence (How Operators Nest) g| 101 -- g| 6. t| Patterns, Actions, and Variables g| 103 -- t| Pattern Elements g| 103 -- t| Using Shell Variables in Programs g| 109 -- t| Actions g| 110 -- t| Control Statements in Actions g| 111 -- t| Built-in Variables g| 120 -- g| 7. t| Arrays in AWK g| 129 -- t| Introduction to Arrays g| 130 -- t| Referring to an Array Element g| 132 -- t| Assigning Array Elements g| 133 -- t| Basic Array Example g| 133 -- t| Scanning All Elements of an Array g| 134 -- t| Delete Statement g| 135 -- t| Using Numbers to Subscript Arrays g| 136 -- t| Using Uninitialized Variables as Subscripts g| 137 -- t| Multidimensional Arrays g| 138 -- t| Scanning Multidimensional Arrays g| 139 -- t| Sorting Array Values and Indices with gawk g| 140 -- g| 8. t| Functions g| 142 -- t| Built-in Functions g| 142 -- t| User-Defined Functions g| 166 -- g| 9. t| Internationalization with GAWK g| 174 -- t| Internationalization and Localization g| 174 -- t| GNU gettext g| 175 -- t| Internationalizing awk Programs g| 177 -- t| Translating AWK Programs g| 179 -- t| A Simple Internationalization Example g| 182 -- t| GAWK Can Speak Your Language g| 183 -- g| 10. t| Advanced Features of gawk g| 185 -- t| Allowing Nondecimal Input Data g| 185 -- t| Two-Way Communications with Another Process g| 186 -- t| Using gawk for Network Programming g| 188 -- t| Using gawk with BSD Portals g| 189 -- t| Profiling Your AWK Programs g| 190 -- g| 11. t| Running awk and GAWK g| 194 -- t| Invoking AWK g| 194 -- t| Command-Line Options g| 195 -- t| Other Command-Line Arguments g| 200 -- t| AWKPATH Environment Variable g| 201 -- t| Obsolete Options and/or Features g| 202 -- t| Known Bugs in GAWK g| 203 -- g| II. t| Using awk and GAWK g| 205 -- g| 12. t| A Library of awk Functions g| 207 -- t| Naming Library Function Global Variables g| 208 -- t| General Programming g| 210 -- t| Datafile Management g| 218 -- t| Processing Command-Line Options g| 222 -- t| Reading the User Database g| 228 -- t| Reading the Group Database g| 232 -- g| 13. t| Practical awk Programs g| 237 -- t| Running the Example Programs g| 237 -- t| Reinventing Wheels for Fun and Profit g| 238 -- t| A Grab Bag of awk Programs g| 259 -- g| 14. t| Internetworking with GAWK g| 281 -- t| Networking with GAWK g| 281 -- t| Some Applications and Techniques g| 305 -- t| Related Links g| 323 -- g| A. t| Evolution of the AWK Language g| 327 -- g| B. t| Installing GAWK g| 337 -- g| C. t| Implementation Notes g| 350.
    596
      
      
    a| 5
    650
      
    0
    a| AWK (Computer program language)
    999
      
      
    a| QA76.73 .A95 R63 2001 w| LC i| X004526510 k| CHECKEDOUT l| STACKS m| SCI-ENG t| BOOK
▾See more
▴See less

Availability

Google Preview

Google Books Preview
Library Location Map Availability Call Number
Brown Science and Engineering CHECKED OUT N/A Unavailable