awk
In multiline awk
programs/scripts, actions preceded by BEGIN
, a predicate (test-action), or END
should insert a space before the opening curly brace ({
). Single-line actions should insert a space after the opening curly and before the ending curly. Functions should insert a newline before/after the opening/closing curly brace. If the function can be written on a single-line in less than 80 characters, space can be used instead of newline.
Localized function variables declared in the argument scope should be preceded by eight (8) spaces to separate them from the intended function arguments. If the arguments and locals together would exceed 79 characters, separate arguments and locals with a newline.
Precede functions with intended syntax and description.
Last updated