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
- if statement usage
- switch statement usage
- The while loop construct
- The for loop construct
- Different statements affecting flow controls
- Break usage
- Next usage
- The exit statement