-
Book Overview & Buying
-
Table Of Contents
Linux Command Line and Shell Scripting Bible - Third Edition
By :
The gawk programming language provides quite a few built-in functions that perform common mathematical, string, and even time functions. You can utilize these functions in your gawk programs to help cut down on the coding requirements in your scripts. This section walks you through the different built-in functions available in gawk.
If you've done programming in any type of language, you're probably familiar with using built-in functions in your code to perform common mathematical functions. The gawk programming language doesn't disappoint those looking for advanced mathematical features.
Table 22.4 shows the mathematical built-in functions available in gawk.
Table 22.4 The gawk Mathematical Functions
| Function | Description |
atan2(x, y) |
The arctangent of x / y, with x and y specified in radians |
cos(x) |
The cosine of x, with x specified in radians |
exp(x) |
The exponential of x |
int(x) |
The integer part of x, truncated toward... |
Change the font size
Change margin width
Change background colour