The use of expressions in which you can store, manipulate, and retrieve data is quite different from anything you can do in sed, yet it is a common feature of most programming languages.
An expression is evaluated and returns a value. An expression consists of any combination of numeric and string constants, variables, operators, functions, and regular expressions. We covered regular expressions in detail in Chapter 2, and they are summarized in Appendix B. Functions will be discussed fully in Chapter 9. In this section, we will look at expressions consisting of constants, variables, and operators.
There are two types of constants: string or numeric (“red” or 1). A string must be quoted in an expression. Strings can make use of the escape sequences listed in Table 7.1.
|\a||Alert character, usually ASCII BEL character|
|\||Character represented as 1 to 3 digit octal value|
|\xhex||Character represented as hexadecimal value|
|\c||Any literal character c (e.g., \” for ")|
 POSIX does not provide “\x”, but it is commonly available.
 Like ANSI C, POSIX leaves purposely undefined what you get when you put a backslash before any character not listed in the table. In most awks, you just get that character.
A variable is an identifier that references a value. To define a variable, you only have to name it and assign it a value. The name can only contain ...