O'Reilly logo

Learning AWK Programming by Shiwang Kalkhanda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

AWK Expressions

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required