aboutsummaryrefslogtreecommitdiffstats
path: root/awklib/eg/lib/inplace.awk
blob: 6403a228dc0f56067a40b952132a7ba9b7f4c73b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 rule.

BEGINFILE {
    inplace_begin(FILENAME, INPLACE_SUFFIX)
}

ENDFILE {
    inplace_end(FILENAME, INPLACE_SUFFIX)
}