awk    hoch
 
 


 Hello World   Michael Neumann
#
# Hello World in awk
#

BEGIN {
  print "Hello World"
}
Gibt "Hello World" auf dem Bildschirm aus.


 Squares   Michael Neumann
function sqr(n) {
  return n*n
}

BEGIN {
  for(i=1; i<=10; i++) {
    printf "%d ", sqr(i) 
  }
  print    # new line
}
Gibt die Quadrate von 1 bis 10 aus.