Chapter 7. AWK Control Flow Statements
This chapter covers the control structures of the AWK programming language. This includes the different types of conditional and looping statements, such as if...else, do...while, switch...case, and so on available in AWK . The syntax for conditional and looping constructs is very similar to that of C programming language. If you are already familiar with C, then you will find it quite easy, and those who are new to programming will also find it simple and easy to understand.
In this chapter, we will cover the following topics:
- Different conditional constructs
ifstatement usageswitchstatement usage- The
whileloop construct - The
forloop construct - Different statements affecting flow controls
BreakusageNextusage- The
exitstatement