Gawk usage
From wikinotes
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
run an awk file from interpreter
awk -f file.awk [arg..] # run awk scriptOr use a shebang to indicate script runs in awk
#!/usr/bin/env awk -f # foo.awkand run it directly
./foo.awk