Gawk usage

From wikinotes
Revision as of 01:00, 19 July 2021 by Will (talk | contribs) (Created page with "Awk is a versatile glue language, and it can be used in a few ways. = Stdin = <blockquote> <syntaxhighlight lang="bash"> echo 'aa bb cc' | awk '{print $2}' # bb </syntaxhigh...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Awk is a versatile glue language, and it can be used in a few ways.

Stdin

echo 'aa bb cc' | awk '{print $2}'  # bb

Commands

awk 'BEIGN {print 1.5 / 2}'  # 0.75

Scripting