diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 198 |
1 files changed, 109 insertions, 89 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index bd325521..d3dc7d3d 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -25838,17 +25838,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 @@ -25859,6 +25873,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. @@ -35329,92 +35349,92 @@ Node: Extension Sample File Functions1035812 Node: Extension Sample Fnmatch1043461 Node: Extension Sample Fork1044948 Node: Extension Sample Inplace1046166 -Node: Extension Sample Ord1048252 -Node: Extension Sample Readdir1049088 -Ref: table-readdir-file-types1049977 -Node: Extension Sample Revout1050782 -Node: Extension Sample Rev2way1051371 -Node: Extension Sample Read write array1052111 -Node: Extension Sample Readfile1054053 -Node: Extension Sample Time1055148 -Node: Extension Sample API Tests1056496 -Node: gawkextlib1056988 -Node: Extension summary1059435 -Node: Extension Exercises1063127 -Node: Language History1064624 -Node: V7/SVR3.11066280 -Node: SVR41068433 -Node: POSIX1069867 -Node: BTL1071247 -Node: POSIX/GNU1071977 -Node: Feature History1077816 -Node: Common Extensions1092135 -Node: Ranges and Locales1093418 -Ref: Ranges and Locales-Footnote-11098034 -Ref: Ranges and Locales-Footnote-21098061 -Ref: Ranges and Locales-Footnote-31098296 -Node: Contributors1098517 -Node: History summary1104086 -Node: Installation1105466 -Node: Gawk Distribution1106411 -Node: Getting1106895 -Node: Extracting1107718 -Node: Distribution contents1109356 -Node: Unix Installation1115452 -Node: Quick Installation1116134 -Node: Shell Startup Files1118548 -Node: Additional Configuration Options1119626 -Node: Configuration Philosophy1121431 -Node: Non-Unix Installation1123801 -Node: PC Installation1124259 -Node: PC Binary Installation1125579 -Node: PC Compiling1127431 -Ref: PC Compiling-Footnote-11130455 -Node: PC Testing1130564 -Node: PC Using1131744 -Node: Cygwin1135858 -Node: MSYS1136628 -Node: VMS Installation1137129 -Node: VMS Compilation1137920 -Ref: VMS Compilation-Footnote-11139150 -Node: VMS Dynamic Extensions1139208 -Node: VMS Installation Details1140893 -Node: VMS Running1143146 -Node: VMS GNV1145987 -Node: VMS Old Gawk1146722 -Node: Bugs1147193 -Node: Other Versions1151307 -Node: Installation summary1157781 -Node: Notes1158839 -Node: Compatibility Mode1159704 -Node: Additions1160486 -Node: Accessing The Source1161411 -Node: Adding Code1162847 -Node: New Ports1169002 -Node: Derived Files1173490 -Ref: Derived Files-Footnote-11178975 -Ref: Derived Files-Footnote-21179010 -Ref: Derived Files-Footnote-31179608 -Node: Future Extensions1179722 -Node: Implementation Limitations1180380 -Node: Extension Design1181563 -Node: Old Extension Problems1182717 -Ref: Old Extension Problems-Footnote-11184235 -Node: Extension New Mechanism Goals1184292 -Ref: Extension New Mechanism Goals-Footnote-11187656 -Node: Extension Other Design Decisions1187845 -Node: Extension Future Growth1189958 -Node: Old Extension Mechanism1190794 -Node: Notes summary1192557 -Node: Basic Concepts1193739 -Node: Basic High Level1194420 -Ref: figure-general-flow1194702 -Ref: figure-process-flow1195387 -Ref: Basic High Level-Footnote-11198688 -Node: Basic Data Typing1198873 -Node: Glossary1202201 -Node: Copying1234147 -Node: GNU Free Documentation License1271686 -Node: Index1296804 +Node: Extension Sample Ord1049095 +Node: Extension Sample Readdir1049931 +Ref: table-readdir-file-types1050820 +Node: Extension Sample Revout1051625 +Node: Extension Sample Rev2way1052214 +Node: Extension Sample Read write array1052954 +Node: Extension Sample Readfile1054896 +Node: Extension Sample Time1055991 +Node: Extension Sample API Tests1057339 +Node: gawkextlib1057831 +Node: Extension summary1060278 +Node: Extension Exercises1063970 +Node: Language History1065467 +Node: V7/SVR3.11067123 +Node: SVR41069276 +Node: POSIX1070710 +Node: BTL1072090 +Node: POSIX/GNU1072820 +Node: Feature History1078659 +Node: Common Extensions1092978 +Node: Ranges and Locales1094261 +Ref: Ranges and Locales-Footnote-11098877 +Ref: Ranges and Locales-Footnote-21098904 +Ref: Ranges and Locales-Footnote-31099139 +Node: Contributors1099360 +Node: History summary1104929 +Node: Installation1106309 +Node: Gawk Distribution1107254 +Node: Getting1107738 +Node: Extracting1108561 +Node: Distribution contents1110199 +Node: Unix Installation1116295 +Node: Quick Installation1116977 +Node: Shell Startup Files1119391 +Node: Additional Configuration Options1120469 +Node: Configuration Philosophy1122274 +Node: Non-Unix Installation1124644 +Node: PC Installation1125102 +Node: PC Binary Installation1126422 +Node: PC Compiling1128274 +Ref: PC Compiling-Footnote-11131298 +Node: PC Testing1131407 +Node: PC Using1132587 +Node: Cygwin1136701 +Node: MSYS1137471 +Node: VMS Installation1137972 +Node: VMS Compilation1138763 +Ref: VMS Compilation-Footnote-11139993 +Node: VMS Dynamic Extensions1140051 +Node: VMS Installation Details1141736 +Node: VMS Running1143989 +Node: VMS GNV1146830 +Node: VMS Old Gawk1147565 +Node: Bugs1148036 +Node: Other Versions1152150 +Node: Installation summary1158624 +Node: Notes1159682 +Node: Compatibility Mode1160547 +Node: Additions1161329 +Node: Accessing The Source1162254 +Node: Adding Code1163690 +Node: New Ports1169845 +Node: Derived Files1174333 +Ref: Derived Files-Footnote-11179818 +Ref: Derived Files-Footnote-21179853 +Ref: Derived Files-Footnote-31180451 +Node: Future Extensions1180565 +Node: Implementation Limitations1181223 +Node: Extension Design1182406 +Node: Old Extension Problems1183560 +Ref: Old Extension Problems-Footnote-11185078 +Node: Extension New Mechanism Goals1185135 +Ref: Extension New Mechanism Goals-Footnote-11188499 +Node: Extension Other Design Decisions1188688 +Node: Extension Future Growth1190801 +Node: Old Extension Mechanism1191637 +Node: Notes summary1193400 +Node: Basic Concepts1194582 +Node: Basic High Level1195263 +Ref: figure-general-flow1195545 +Ref: figure-process-flow1196230 +Ref: Basic High Level-Footnote-11199531 +Node: Basic Data Typing1199716 +Node: Glossary1203044 +Node: Copying1234990 +Node: GNU Free Documentation License1272529 +Node: Index1297647 End Tag Table |