diff options
Diffstat (limited to 'awklib/eg/lib/inplace.awk')
-rw-r--r-- | awklib/eg/lib/inplace.awk | 14 |
1 files changed, 14 insertions, 0 deletions
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) +} |