See also

Awk reference and ressources Example files
gnu.org mail-list
oreilly effective awk programming inventory-shipped

Getting Started with awk

Command line

ls -l | awk '$7 =="janv." { sum += $5 } END {print sum}'
ls -l | awk '($1 ~ "^-") && ( $7 =="janv."){files_sum += $5} END {print files_sum}'
ls -l | awk '($1 ~ "^-") && ( $7 =="janv."){files_sum += $5} END {print files_sum/1024}'
ls -l | awk '($1 ~ "^-") && ( $7 =="janv."){files_sum += $5} END {print files_sum/1024/1024}'
awk 'BEGIN { for (i = 1; i <= 7; i++)
print int(101 * rand()) }'

Script

#! /bin/awk -f

BEGIN { print "Don't Panic!" }