March 2018
Beginner to intermediate
416 pages
9h 24m
English
This is a single and simple if statement used to test a condition/expression. It executes the actions given in the body part only if the conditional expression is evaluated as true. Its syntax is as follows:
if ( conditional-expression )
action
If two or more actions need to be executed when the condition is true, then those actions should be enclosed in curly braces. The individual AWK action statements should be separated by newlines or semicolons as shown here:
if ( conditional-expression )
{ action1;
action2;
……… }
If the conditional expression is true, then all the actions enclosed in the braces are executed ...
Read now
Unlock full access