Here is the customary "Hello, world" program written in AWK: BEGIN { print "Hello, world!" } Note that an explicit exit statement is not needed here; since the only pattern is BEGIN, no command-line arguments are processed.
Evo uobičajenog 'Zdravo svete' programa napisanog u AWK: BEGIN { print "Hello, world!" } Imajte na unu da eksplicitna exit izjava nije potrebna; pošto je jedini obrazac BEGIN, argumenti komandne linije se ne obrađuju.