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

The while loop

The while is the simplest looping statement in AWK. A while statement has a condition and a body. The body contains the action statements that are executed till the condition is true. The condition could be a logical condition or conditional-expression that evaluates to true. First while statement tests the condition; if the condition evaluates to true, then it executes the statements specified in the body. Once all the statements specified in the body have been executed, the condition is again tested and, if it is still true, statements in body executes again. This process is repeated as long as the condition is true. If the condition returns false before the first iteration of the loop, the body of the loop never executes ...

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