test/messages.awk
raw| 1 | # This is a demo of different ways of printing with gawk. Try it |
| 2 | # with and without -c (compatibility) flag, redirecting output |
| 3 | # from gawk to a file or not. Some results can be quite unexpected. |
| 4 | BEGIN { |
| 5 | print "Goes to a file out1" > "_out1" |
| 6 | print "Normal print statement" |
| 7 | print "This printed on stdout" > "/dev/stdout" |
| 8 | print "You blew it!" > "/dev/stderr" |
| 9 | } |