aboutsummaryrefslogtreecommitdiffstats
path: root/test/setrec1.awk
diff options
context:
space:
mode:
Diffstat (limited to 'test/setrec1.awk')
-rw-r--r--test/setrec1.awk9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/setrec1.awk b/test/setrec1.awk
new file mode 100644
index 00000000..3da1aa10
--- /dev/null
+++ b/test/setrec1.awk
@@ -0,0 +1,9 @@
+function reassign(x, y) {
+ $0 = x
+ print y
+}
+
+BEGIN {
+ $0 = substr("geronimo", 5, 3)
+ reassign(" 52", $1)
+}