diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 196 |
1 files changed, 108 insertions, 88 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index 5eda5ad9..2378fef8 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -25561,17 +25561,31 @@ The 'inplace' extension emulates GNU 'sed''s '-i' option, which performs # 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. + # By default, each filename on the command line will be edited inplace. + # But you can selectively disable this by adding an inplace=0 argument + # prior to files that you do not want to process this way. You can then + # reenable it later on the commandline by putting inplace=1 before files + # that you wish to be subject to inplace editing. + # N.B. We call inplace_end() in the BEGINFILE and END rules so that any # actions in an ENDFILE rule will be redirected as expected. + BEGIN { + inplace = 1 # enabled by default + } + BEGINFILE { if (_inplace_filename != "") inplace_end(_inplace_filename, INPLACE_SUFFIX) - inplace_begin(_inplace_filename = FILENAME, INPLACE_SUFFIX) + if (inplace) + inplace_begin(_inplace_filename = FILENAME, INPLACE_SUFFIX) + else + _inplace_filename = "" } END { - inplace_end(FILENAME, INPLACE_SUFFIX) + if (_inplace_filename != "") + inplace_end(_inplace_filename, INPLACE_SUFFIX) } For each regular file that is processed, the extension redirects @@ -25582,6 +25596,12 @@ extension restores standard output to its original destination. If a backup file name created by appending that suffix. Finally, the temporary file is renamed to the original file name. + Note that the use of this feature can be controlled by placing +'inplace=0' on the command-line prior to listing files that should not +be processed this way. You can reenable inplace editing by adding an +'inplace=1' argument prior to files that should be subject to inplace +editing. + The '_inplace_filename' variable serves to keep track of the current filename so as to not invoke 'inplace_end()' before processing the first file. @@ -34966,91 +34986,91 @@ Node: Extension Sample File Functions1023883 Node: Extension Sample Fnmatch1031532 Node: Extension Sample Fork1033019 Node: Extension Sample Inplace1034237 -Node: Extension Sample Ord1036323 -Node: Extension Sample Readdir1037159 -Ref: table-readdir-file-types1038048 -Node: Extension Sample Revout1038853 -Node: Extension Sample Rev2way1039442 -Node: Extension Sample Read write array1040182 -Node: Extension Sample Readfile1042124 -Node: Extension Sample Time1043219 -Node: Extension Sample API Tests1044567 -Node: gawkextlib1045059 -Node: Extension summary1047483 -Node: Extension Exercises1051175 -Node: Language History1052672 -Node: V7/SVR3.11054328 -Node: SVR41056481 -Node: POSIX1057915 -Node: BTL1059295 -Node: POSIX/GNU1060025 -Node: Feature History1065546 -Node: Common Extensions1078876 -Node: Ranges and Locales1080159 -Ref: Ranges and Locales-Footnote-11084775 -Ref: Ranges and Locales-Footnote-21084802 -Ref: Ranges and Locales-Footnote-31085037 -Node: Contributors1085258 -Node: History summary1090827 -Node: Installation1092207 -Node: Gawk Distribution1093152 -Node: Getting1093636 -Node: Extracting1094459 -Node: Distribution contents1096097 -Node: Unix Installation1101850 -Node: Quick Installation1102466 -Node: Additional Configuration Options1104893 -Node: Configuration Philosophy1106697 -Node: Non-Unix Installation1109067 -Node: PC Installation1109525 -Node: PC Binary Installation1110845 -Node: PC Compiling1112697 -Ref: PC Compiling-Footnote-11115721 -Node: PC Testing1115830 -Node: PC Using1117010 -Node: Cygwin1121124 -Node: MSYS1121894 -Node: VMS Installation1122395 -Node: VMS Compilation1123186 -Ref: VMS Compilation-Footnote-11124416 -Node: VMS Dynamic Extensions1124474 -Node: VMS Installation Details1126159 -Node: VMS Running1128412 -Node: VMS GNV1131253 -Node: VMS Old Gawk1131988 -Node: Bugs1132459 -Node: Other Versions1136573 -Node: Installation summary1143047 -Node: Notes1144105 -Node: Compatibility Mode1144970 -Node: Additions1145752 -Node: Accessing The Source1146677 -Node: Adding Code1148113 -Node: New Ports1154268 -Node: Derived Files1158756 -Ref: Derived Files-Footnote-11164241 -Ref: Derived Files-Footnote-21164276 -Ref: Derived Files-Footnote-31164874 -Node: Future Extensions1164988 -Node: Implementation Limitations1165646 -Node: Extension Design1166829 -Node: Old Extension Problems1167983 -Ref: Old Extension Problems-Footnote-11169501 -Node: Extension New Mechanism Goals1169558 -Ref: Extension New Mechanism Goals-Footnote-11172922 -Node: Extension Other Design Decisions1173111 -Node: Extension Future Growth1175224 -Node: Old Extension Mechanism1176060 -Node: Notes summary1177823 -Node: Basic Concepts1179005 -Node: Basic High Level1179686 -Ref: figure-general-flow1179968 -Ref: figure-process-flow1180653 -Ref: Basic High Level-Footnote-11183954 -Node: Basic Data Typing1184139 -Node: Glossary1187467 -Node: Copying1219413 -Node: GNU Free Documentation License1256952 -Node: Index1282070 +Node: Extension Sample Ord1037166 +Node: Extension Sample Readdir1038002 +Ref: table-readdir-file-types1038891 +Node: Extension Sample Revout1039696 +Node: Extension Sample Rev2way1040285 +Node: Extension Sample Read write array1041025 +Node: Extension Sample Readfile1042967 +Node: Extension Sample Time1044062 +Node: Extension Sample API Tests1045410 +Node: gawkextlib1045902 +Node: Extension summary1048326 +Node: Extension Exercises1052018 +Node: Language History1053515 +Node: V7/SVR3.11055171 +Node: SVR41057324 +Node: POSIX1058758 +Node: BTL1060138 +Node: POSIX/GNU1060868 +Node: Feature History1066389 +Node: Common Extensions1079719 +Node: Ranges and Locales1081002 +Ref: Ranges and Locales-Footnote-11085618 +Ref: Ranges and Locales-Footnote-21085645 +Ref: Ranges and Locales-Footnote-31085880 +Node: Contributors1086101 +Node: History summary1091670 +Node: Installation1093050 +Node: Gawk Distribution1093995 +Node: Getting1094479 +Node: Extracting1095302 +Node: Distribution contents1096940 +Node: Unix Installation1102693 +Node: Quick Installation1103309 +Node: Additional Configuration Options1105736 +Node: Configuration Philosophy1107540 +Node: Non-Unix Installation1109910 +Node: PC Installation1110368 +Node: PC Binary Installation1111688 +Node: PC Compiling1113540 +Ref: PC Compiling-Footnote-11116564 +Node: PC Testing1116673 +Node: PC Using1117853 +Node: Cygwin1121967 +Node: MSYS1122737 +Node: VMS Installation1123238 +Node: VMS Compilation1124029 +Ref: VMS Compilation-Footnote-11125259 +Node: VMS Dynamic Extensions1125317 +Node: VMS Installation Details1127002 +Node: VMS Running1129255 +Node: VMS GNV1132096 +Node: VMS Old Gawk1132831 +Node: Bugs1133302 +Node: Other Versions1137416 +Node: Installation summary1143890 +Node: Notes1144948 +Node: Compatibility Mode1145813 +Node: Additions1146595 +Node: Accessing The Source1147520 +Node: Adding Code1148956 +Node: New Ports1155111 +Node: Derived Files1159599 +Ref: Derived Files-Footnote-11165084 +Ref: Derived Files-Footnote-21165119 +Ref: Derived Files-Footnote-31165717 +Node: Future Extensions1165831 +Node: Implementation Limitations1166489 +Node: Extension Design1167672 +Node: Old Extension Problems1168826 +Ref: Old Extension Problems-Footnote-11170344 +Node: Extension New Mechanism Goals1170401 +Ref: Extension New Mechanism Goals-Footnote-11173765 +Node: Extension Other Design Decisions1173954 +Node: Extension Future Growth1176067 +Node: Old Extension Mechanism1176903 +Node: Notes summary1178666 +Node: Basic Concepts1179848 +Node: Basic High Level1180529 +Ref: figure-general-flow1180811 +Ref: figure-process-flow1181496 +Ref: Basic High Level-Footnote-11184797 +Node: Basic Data Typing1184982 +Node: Glossary1188310 +Node: Copying1220256 +Node: GNU Free Documentation License1257795 +Node: Index1282913 End Tag Table |