From 1abfe5e82822a9e81a3bd1df2e7747afbc0ae1b9 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Tue, 8 Jan 2013 20:56:33 -0500 Subject: Add inplace file editing extension. --- awklib/ChangeLog | 4 ++++ awklib/eg/lib/inplace.awk | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 awklib/eg/lib/inplace.awk (limited to 'awklib') 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 + + * eg/lib/inplace.awk: Add new file generated from doc/gawk.texi. + 2012-12-24 Arnold D. Robbins * 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) +} -- cgit v1.2.3