Awk Tips
Collection of Awk tips and tricks
-
Running shell commands with variable assigned parameters
Awk can take control of pipes instead of piping from a shell process to Awk
-
Pattern match against variable value
TLDR
$0 ~ _variable_name { print } -
Hello World in pure Awk
TLDR use shebang with
-fto make file an Awk script, eg.#!/usr/bin/awk -f -
Floating point math
TLDR
awk "BEGIN {print 10 * 4.2}"