Expressions are the basic building blocks of any programming language. They form its core logic. Expressions evaluate to a value that we can test, print, or pass to any function. They are also used to assign a new value to a variable. AWK expressions are made up of operators and operands, which consist of constants, variables, regular expressions, and function calls.
In this chapter, we will cover the following topics:
- AWK variables and constants
- Expressions using binary arithmetic operators
- Expressions using assignment operations
- Expressions using increment and decrement operators
- Expressions using relational operators
- Expressions using logical operators
- Expressions using ternary operators
- Unary arithmetic expressions
- Exponential expressions
- String concatenation
- Regular expression operators