The AWK Programming Language

by Alfred V. Aho (Author), Brian W. Kernighan (Author), Peter J. Weinberger (Author)

On This Page

Description

Awk was developed in 1977 at Bell Labs, and it's still a remarkably useful tool for solving a wide variety of problems quickly and efficiently. In this update of the classic Awk book, the creators of the language show you what Awk can do and teach you how to use it effectively.

Tags

Recommendations

Member Reviews

4 reviews
This thin little paperback book cost me $45! But with it, I was able to work some minor miracles with AWK that saved my company thousands of dollars. If you have to do lots of searching or manipulation on text files, AWK is the way to go, and this book will make it happen. The best guide to AWK, bar none.
Although I bought this years ago, I didn't actually learn AWK until after I'd learned Perl (by which time, of course, I didn't really need AWK anymore.) So I'm really rating not the book (which is well written) but the ideas in AWK, which are so much a key part of Perl.
Before Perl there was AWK and this book was great. Now we have Perl....
Indeholder "Contents", "Preface", "Chapter 1: An Awk Tutorial", "1.1 Getting Started", " The Structure of an AWK Program", " Running an AWK Program", " Errors", "1.2 Simple Output", " Printing Every Line", " Printing Certain Fields", " NF, the Number of Fields", " Computing and Printing", " Printing Line Numbers", " Putting Text in the Output", "1.3 Fancier Output", " Lining Up Fields", " Sorting the Output", "1.4 Selection", " Selection by Comparison", " Selection by Computation", " Selection by Text Content", " Combinations of Patterns", " Data Validation", " BEGIN and END", "1.5 Computing with AWK", " Counting", " Computing Sums and Averages", " Handling Text", " String Concatenation", " Printing the Last Input Line", " Built-in show more Functions", " Counting Lines, Words, and Characters", "1.6 Control-Flow Statements", " lf-Else Statement", " While Statement", " For Statement", "1.7 Arrays", "1.8 A Handful of Useful "One-liners"", "1.9 What Next?", "Chapter 2: The Awk Language", " The Input File countries", " Program Format", "2.1 Patterns", " BEGIN and END", " Expressions as Patterns", " String-Matching Patterns", " Regular Enpressions", " Compound Patterns", " Range patterns", " Summary of Patterns", "2.2 Actions", " Expressions", " Control-Flow Statements", " Empty Statement", " Arrays", "2.3 User-Defined Functions", "2.4 Output", " The print Statement", " Output Separators", " The printf Statement", " Output into Files", " Output into Pipes", " Closing Files and Pipes", "2.5 Input", " Input Separators", " Multiline Records", " The getline Function", " Command-Line Variable Assignments", " Command-Line Arguments", "2.6 Interaction with Other Programs", " The system Function", " Making a Shell Command from an AWK Program", "2.7 Summary", "Chapter 3: Data Processing", "3.1 Data Transformation and Reduction", " Summing Columns", " Computing Percentages and quantiles", " Numbers with Commas", " Fixed-Field Input", " Program Cross-Reference Checking", " Formatted Output", "3.2 Data Validation", " Balanced Delimiters", " Password-File Checking", " Generating Data-Validation Programs", " Which Version of AWK?", "3.3 Bundle and Unbundle", "3.4 Multiline Records", " Records Separated by Blank Lines", " Processing Multiline Records", " Records with Headers and Trailers", " Name-Value Data", "3.5 Summary", "Chapter 4: Reports and Databases", "4.1 Generating Reports", " A Simple Report", " A More Complex Report", "4.2 Packaged Queries and Reports", " Form Letters", "4.3 A Relational Database System", " Natural Joins", " The relfile", " q, an awk-like query language", " qawk, a q-to-awk translator", "4.4 Summary", "Chapter 5: Processing words", "5.1 Random Text Generation", " Random Choices", " Cliche Generation", " Random Sentences", "5.2 Interactive Text-Manipulation", " Skills Testing: Arithmetic", " Skills Testing: Quiz", "5.3 Text Processing", " Word Count", " Text Formatting", " Maintaining Cross-References in Manuscripts", " Making a KWIC Index", " Making Indexes", "5.4 Summary", "Chapter 6: Little Languages", "6.1 An Assembler and Interpreter", "6.2 A Language for Drawing Graphs", "6.3 A Sort Generator", "6.4 A Reverse-Polish Calculator", "6.5 An Infix Calculator", "6.6 Recursive-Descent Parsing", "6.7 Summary", "Chapter 7: Experiments with Algorithms", "7.1 Sorting", " Insertion Sort", " Quicksort", " Heapsort", "7.2 Profiling", "7.3 Topological Sorting", " Breadth-First Topological Sort", " Depth-First Search", " Depth-First Topological Sort", "7.4 Make: A File Updating Program", "7.5 Summary", "Chapter 8: Epilog", "8.1 AWK as a Language", "8.2 Performance", "8.3 Conclusion", "Appendix A: AWK Summary", "Appendix B: Answers to selected Exercises", "Index".

Et spøjst tekstbehandlingssprog forfattet af tre kloge hoveder på AT&T. Sproget er ikke helt rart og nogle overraskelser gemmer sig i krogene af implementationerne, så kig evt efter "A Supplemental Document For AWK -or- Things Al, Pete, And Brian Didn't Mention Much".
Ellers er bogen faktisk udmærket med nyttige! eksempler strøet rundt omkring. AWK har inspireret Perl en hel del. Jeg foretrækker Perl, men en masse af mine programmer er inspireret af eksempler i den her bog.
show less

Members

Recently Added By

Author Information

Picture of author.
Author
19 Works 2,779 Members
Picture of author.
Author
28 Works 7,353 Members
Brian W. Kernighan is a professor in the Department of Computer Science at Princeton University. His many books include Millions, Billions, Zillions (Princeton) and the computing classic The C Programming Language (Prentice Hall).
Author
1 Work 300 Members

Common Knowledge

Original publication date
1988

Classifications

Genres
Technology, Nonfiction, General Nonfiction
DDC/MDS
005.133Computer science, information & general worksComputer science, knowledge & systemsArtificial Intelligence/Virtual RealitySoftware developmentComputer programmingSpecific programming languages
LCC
QA76.73 .A95 .A35ScienceMathematicsMathematicsInstruments and machinesCalculating machinesElectronic computers. Computer science
BISAC

Statistics

Members
302
Popularity
105,719
Reviews
4
Rating
(3.83)
Languages
English
Media
Paper, Ebook
ISBNs
3
ASINs
1