diff options
author | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2013-01-08 20:56:33 -0500 |
---|---|---|
committer | Andrew J. Schorr <aschorr@telemetry-investments.com> | 2013-01-08 20:56:33 -0500 |
commit | 1abfe5e82822a9e81a3bd1df2e7747afbc0ae1b9 (patch) | |
tree | 2deac40bf78a9acbb4d777f5f4520fd5731df5e5 /awklib | |
parent | 155fc0deca8d8976915fdc5edc84c4c6a1af652b (diff) | |
download | egawk-1abfe5e82822a9e81a3bd1df2e7747afbc0ae1b9.tar.gz egawk-1abfe5e82822a9e81a3bd1df2e7747afbc0ae1b9.tar.bz2 egawk-1abfe5e82822a9e81a3bd1df2e7747afbc0ae1b9.zip |
Add inplace file editing extension.
Diffstat (limited to 'awklib')
-rw-r--r-- | awklib/ChangeLog | 4 | ||||
-rw-r--r-- | awklib/eg/lib/inplace.awk | 14 |
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) +} |