Web server on xp - Sams Teach Yourself Shell Programming in 24 Hours

Sams Teach Yourself Shell Programming in 24 Hours Contents Index Hour 17: Filtering Text with awk Previous Chapter Next Chapter Sections in this Chapter: What is awk? Questions Using awk Features Terms Summary Previous Section Next Section Hour 17 Filtering Text with awk In Chapter 16, “Filtering Text Using Regular Expressions,” you looked at the sed command and used regular expressions to filter text. In this chapter you will look at another powerful text filtering command called awk. The awk command is a complete programming language that enables you to search many files for patterns and conditionally modify files without having to worry about opening files, reading lines, or closing files. It’s found on all UNIX systems and is quite fast, easy to learn, and extremely flexible. This chapter concentrates on the awk elements that are most commonly used in shell scripts. Specifically these features are l Field editing l Variables l Flow control statements What is awk? Basic Syntax Comparison Operators Field Editing Using STDIN as Input Taking Pattern-Specific Actions The awk command is a programming language that enables you to search through files and modify records with these files based on patterns. The name awk comes from the last names of its creators Alfred Aho, Peter Weinberger, and Brian Kernighan. It has been a part of UNIX since 1978, when it was added to UNIX Version 7. Currently three main versions are available: l The original awk l A newer version nawk l The POSIX/GNU version gawk
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Leave a Reply