awk Programming 

Built-in Functions

awk has several functions already built-in for string and numeric operations. Here are some of the most common, and ones I'm familiar with. Others are available if you wish to pursue that option.

Numeric

String-manipulation

CAUTION: A number of functions deal with indices into strings. For these functions, the first character of a string is at position (index) one. This is different from C and the languages descended from it, where the first character is at position zero. You need to remember this when doing index calculations, particularly if you are used to C.

Special Patterns

These patterns supply startup and cleanup actions but there is no default action since there is no current record when they run.