tailieunhanh - UNIX UNLEASHED PHẦN 3

Bạn có thể làm nhiều việc mà không cần có kiến thức rộng về làm thế nào họ thực sự làm việc. Ví dụ, bạn có thể lái một chiếc xe hơi mà không hiểu tính chất vật lý của động cơ đốt trong. Thiếu kiến thức về điện tử không ngăn cản bạn thưởng thức âm nhạc từ một máy nghe nhạc CD. | Part III Networking with NetWare Awk Awk Perl The C Programming Language TOC 4 TOC -4 . 15 o Awk Awk o By Ann Marshall Overview Uses Features Brief History Fundamentals Entering Awk from the Command Line Files for Input The Program File Specifying Output on the Command Line Patterns and Actions Input Fields Program Format A Note on awk Error Messages Print Selected Fields Program Components The Input File and Program Patterns BEGIN and END Expressions String Matching Range Patterns Compound Patterns Actions Variables Naming Awk in a Shell Script Built-in Variables Conditions No IFs s or buts The if Statement The Conditional Statement Patterns as Conditions Loops Increment and Decrement The While Statement The Do Statement The For Statement Loop Control Strings Built-In String Functions String Constants Arrays Array Specialties Arithmetic Operators Numeric Functions Input and Output Input The Getline Statement Output The printf Statement Closing Files and Pipes Command Line Arguments Passing Command Line Arguments Setting Variables on the Command Line Functions Function Definition Parameters Variables Function Calls The Return Statement Writing Reports BEGIN and END Revisited The Built-in System Function Advanced Concepts Multi-Line Records Multidimensional Arrays Summary Further Reading Obtaining Source Code 15 Awk Awk By Ann Marshall Overview The UNIX utility awk is a pattern matching and processing language with considerably more power than you may realize. It searches one or more specified files checking for records that match a specified pattern. If awk finds a match the corresponding action is performed. A simple concept but it results in a powerful tool. Often an awk program is only a few lines long and because of this an awk program is often written used and discarded. A traditional programming language such as Pascal or C would take more thought more lines of code and hence more time. Short awk programs arise from two of its built-in features the amount of

TỪ KHÓA LIÊN QUAN