awk
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]
- awk [EN] @ Homebrew Formula
- GNU awk [EN] @ Homebrew Formula
Documentation
- GNU Awk User’s Guide [EN]
- man 1 'awk' [EN]
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
- ↑ Wikipedia contributors. "AWK." Wikipedia. https://en.wikipedia.org/wiki/AWK (accessed 18.08.2025)