awk ![]() |
Hello World | Michael Neumann |
# # Hello World in awk # BEGIN { print "Hello World" } |
Prints "Hello World" onto the
screen. |
Squares | Michael Neumann |
function sqr(n) { return n*n } BEGIN { for(i=1; i<=10; i++) { printf "%d ", sqr(i) } print # new line } |
Outputs the squares from 1 to
10. |