aboutsummaryrefslogtreecommitdiffstats
path: root/test/messages.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:09:58 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:09:58 +0300
commitcae8bc6ced84c12590e3554a06a952283735363a (patch)
treeca4f38bfcb1312bfb62fc693564d68f3e9b3e973 /test/messages.awk
parentdbd583bd2b8a6dd40c622875a4e197360cb5aba7 (diff)
downloadegawk-cae8bc6ced84c12590e3554a06a952283735363a.tar.gz
egawk-cae8bc6ced84c12590e3554a06a952283735363a.tar.bz2
egawk-cae8bc6ced84c12590e3554a06a952283735363a.zip
Move to 2.14.
Diffstat (limited to 'test/messages.awk')
-rw-r--r--test/messages.awk9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/messages.awk b/test/messages.awk
new file mode 100644
index 00000000..555f6e38
--- /dev/null
+++ b/test/messages.awk
@@ -0,0 +1,9 @@
+# This is a demo of different ways of printing with gawk. Try it
+# with and without -c (compatibility) flag, redirecting output
+# from gawk to a file or not. Some results can be quite unexpected.
+BEGIN {
+ print "Goes to a file out1" > "out1"
+ print "Normal print statement"
+ print "This printed on stdout" > "/dev/stdout"
+ print "You blew it!" > "/dev/stderr"
+}