summaryrefslogtreecommitdiff
path: root/test/csvodd.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/csvodd.awk')
-rw-r--r--test/csvodd.awk13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/csvodd.awk b/test/csvodd.awk
new file mode 100644
index 00000000..8d1948ad
--- /dev/null
+++ b/test/csvodd.awk
@@ -0,0 +1,13 @@
+# Show the string contents. Make begin, end, CR and LN visible.
+function show(str) {
+ gsub("\r", "\\r", str)
+ gsub("\n", "\\n", str)
+ printf("<%s>", str)
+}
+
+# Dump the current record
+{
+ show($0); show(RT); print ""
+ for (k=1; k<=NF; k++) show($k); print ""
+}
+