March 2018
Beginner to intermediate
416 pages
9h 24m
English
The switch statement is a GAWK specific feature which is not available in the default AWK program. It allows the evaluation of an expression and the execution of statements if case match. The case statements are checked for a match in the order they are specified. If none of the preceding given case statement match is found, then the default section is executed.
The first switch expression is evaluated and then the output of expression the is compared with the value given with the case statement. Each case statement contains a value that could be a numeric, string, or regular expression. The type of constant determines the comparison with switch expression result. Type of comparison performed ...
Read now
Unlock full access