Jump to content

awk

From RaySoft

awk is a scripting language designed for text processing and typically used as a data extraction and reporting tool. Like sed and grep, it is a filter, and it is a standard feature of most Unix-like operating systems.[1]

Documentation

Syntax

awk [PARAMETER ...] [FILE ...]

Parameters

-F SEPARATOR, --field-separator SEPARATOR
Use SEPARATOR for the input field separator (the value of the FS predefined variable).

Examples

Get the FQHN using nslookup
nslookup 'xeon' | awk --field-separator ':  *' '/Name/{print $2}'

Output:

xeon.raysoft.loc

References

  1. Wikipedia contributors. "AWK." Wikipedia. https://en.wikipedia.org/wiki/AWK (accessed 18.08.2025)