Command Summary for awk
The following alphabetical list of statements and functions includes all that are available in POSIX awk, nawk, or gawk. See Chapter 11, for extensions available in different implementations.
- atan2( )
Returns the arctangent of y/x in radians.
Exit from a while, for, or do loop.
- close( )
In most implementations of awk, you can only have a limited number of files and/or pipes open simultaneously. Therefore, awk provides a close( ) function that allows you to close a file or a pipe. It takes as an argument the same expression that opened the pipe or file. This expression must be identical, character by character, to the one that opened the file or pipe—even whitespace is significant.
Begin next iteration of while, for, or do loop.
- cos( )
Return cosine of x in radians.
Delete element of an array.
Looping statement. Execute statements in body then evaluate expr and if true, execute body again.
Exit from script, reading no new input. The END rule, if it exists, will be executed. An optional expr becomes awk’s return value.
- exp( )
Return exponential of x (e ^ x).
for (init-expr; test-expr; incr-expr) statement
C-style looping construct. init-expr assigns the initial value of the counter variable. test-expr is a relational expression that is evaluated each time before executing the statement. When test-expr is false, the loop is exited. ...