summaryrefslogtreecommitdiff
path: root/awklib
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2013-01-08 20:56:33 -0500
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2013-01-08 20:56:33 -0500
commit1abfe5e82822a9e81a3bd1df2e7747afbc0ae1b9 (patch)
tree2deac40bf78a9acbb4d777f5f4520fd5731df5e5 /awklib
parent155fc0deca8d8976915fdc5edc84c4c6a1af652b (diff)
downloadgawk-1abfe5e82822a9e81a3bd1df2e7747afbc0ae1b9.tar.gz
Add inplace file editing extension.
Diffstat (limited to 'awklib')
-rw-r--r--awklib/ChangeLog4
-rw-r--r--awklib/eg/lib/inplace.awk14
2 files changed, 18 insertions, 0 deletions
diff --git a/awklib/ChangeLog b/awklib/ChangeLog
index 98bdc3dc..1b6a31e6 100644
--- a/awklib/ChangeLog
+++ b/awklib/ChangeLog
@@ -1,3 +1,7 @@
+2013-01-08 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * eg/lib/inplace.awk: Add new file generated from doc/gawk.texi.
+
2012-12-24 Arnold D. Robbins <arnold@skeeve.com>
* 4.0.2: Release tar ball made.
diff --git a/awklib/eg/lib/inplace.awk b/awklib/eg/lib/inplace.awk
new file mode 100644
index 00000000..a090d9e0
--- /dev/null
+++ b/awklib/eg/lib/inplace.awk
@@ -0,0 +1,14 @@
+# inplace --- load and invoke the inplace extension.
+
+@load "inplace"
+
+# Please set INPLACE_SUFFIX to make a backup copy. For example,
+# you may want to set INPLACE_SUFFIX to .bak on the command-line or in a
+# BEGIN block.
+
+BEGINFILE {
+ inplace_begin(FILENAME, INPLACE_SUFFIX)
+}
+ENDFILE {
+ inplace_end(FILENAME, INPLACE_SUFFIX)
+}