diff options
Diffstat (limited to 'doc/gawk.info')
-rw-r--r-- | doc/gawk.info | 1212 |
1 files changed, 642 insertions, 570 deletions
diff --git a/doc/gawk.info b/doc/gawk.info index 6cddc1ba..90ae5848 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -246,6 +246,7 @@ entitled "GNU Free Documentation License". * Special Caveats:: Things to watch out for. * Close Files And Pipes:: Closing Input and Output Files and Pipes. +* Nonfatal:: Enabling Nonfatal Output. * Output Summary:: Output summary. * Output Exercises:: Exercises. * Values:: Constants, Variables, and Regular @@ -3013,7 +3014,8 @@ used by regular users: `GAWK_SOCK_RETRIES' Controls the number of times `gawk' attempts to retry a two-way TCP/IP (socket) connection before giving up. *Note TCP/IP - Networking::. + Networking::. Note that when nonfatal I/O is enabled (*note + Nonfatal::), `gawk' only tries to open a TCP/IP socket once. `POSIXLY_CORRECT' Causes `gawk' to switch to POSIX-compatibility mode, disabling all @@ -5098,9 +5100,9 @@ the built-in variable `FIELDWIDTHS'. Each number specifies the width of the field, _including_ columns between fields. If you want to ignore the columns between fields, you can specify the width as a separate field that is subsequently ignored. It is a fatal error to -supply a field width that is not a positive number. The following data -is the output of the Unix `w' utility. It is useful to illustrate the -use of `FIELDWIDTHS': +supply a field width that has a negative value. The following data is +the output of the Unix `w' utility. It is useful to illustrate the use +of `FIELDWIDTHS': 10:06pm up 21 days, 14:04, 23 users User tty login idle JCPU PCPU what @@ -6128,6 +6130,7 @@ function. `gawk' allows access to inherited file descriptors. * Close Files And Pipes:: Closing Input and Output Files and Pipes. +* Nonfatal:: Enabling Nonfatal Output. * Output Summary:: Output summary. * Output Exercises:: Exercises. @@ -7041,7 +7044,7 @@ that `gawk' provides: behavior. -File: gawk.info, Node: Close Files And Pipes, Next: Output Summary, Prev: Special Files, Up: Printing +File: gawk.info, Node: Close Files And Pipes, Next: Nonfatal, Prev: Special Files, Up: Printing 5.9 Closing Input and Output Redirections ========================================= @@ -7210,9 +7213,68 @@ call. See the system manual pages for information on how to decode this value. -File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Close Files And Pipes, Up: Printing +File: gawk.info, Node: Nonfatal, Next: Output Summary, Prev: Close Files And Pipes, Up: Printing -5.10 Summary +5.10 Enabling Nonfatal Output +============================= + +This minor node describes a `gawk'-specific feature. + + In standard `awk', output with `print' or `printf' to a nonexistent +file, or some other I/O error (such as filling up the disk) is a fatal +error. + + $ gawk 'BEGIN { print "hi" > "/no/such/file" }' + error--> gawk: cmd. line:1: fatal: can't redirect to `/no/such/file' (No such file or directory) + + `gawk' makes it possible to detect that an error has occurred, +allowing you to possibly recover from the error, or at least print an +error message of your choosing before exiting. You can do this in one +of two ways: + + * For all output files, by assigning any value to + `PROCINFO["NONFATAL"]'. + + * On a per-file basis, by assigning any value to `PROCINFO[FILENAME, + "NONFATAL"]'. Here, FILENAME is the name of the file to which you + wish output to be nonfatal. + + Once you have enabled nonfatal output, you must check `ERRNO' after +every relevant `print' or `printf' statement to see if something went +wrong. It is also a good idea to initialize `ERRNO' to zero before +attempting the output. For example: + + $ gawk ' + > BEGIN { + > PROCINFO["NONFATAL"] = 1 + > ERRNO = 0 + > print "hi" > "/no/such/file" + > if (ERRNO) { + > print("Output failed:", ERRNO) > "/dev/stderr" + > exit 1 + > } + > }' + error--> Output failed: No such file or directory + + Here, `gawk' did not produce a fatal error; instead it let the `awk' +program code detect the problem and handle it. + + This mechanism works also for standard output and standard error. +For standard output, you may use `PROCINFO["-", "NONFATAL"]' or +`PROCINFO["/dev/stdout", "NONFATAL"]'. For standard error, use +`PROCINFO["/dev/stderr", "NONFATAL"]'. + + When attempting to open a TCP/IP socket (*note TCP/IP Networking::), +`gawk' tries multiple times. The `GAWK_SOCK_RETRIES' environment +variable (*note Other Environment Variables::) allows you to override +`gawk''s builtin default number of attempts. However, once nonfatal +I/O is enabled for a given socket, `gawk' only retries once, relying on +`awk'-level code to notice that there was a problem. + + +File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Nonfatal, Up: Printing + +5.11 Summary ============ * The `print' statement prints comma-separated expressions. Each @@ -7234,11 +7296,16 @@ File: gawk.info, Node: Output Summary, Next: Output Exercises, Prev: Close Fi For coprocesses, it is possible to close only one direction of the communications. + * Normally errors with `print' or `printf' are fatal. `gawk' lets + you make output errors be nonfatal either for all files or on a + per-file basis. You must then check for errors after every + relevant output statement. + File: gawk.info, Node: Output Exercises, Prev: Output Summary, Up: Printing -5.11 Exercises +5.12 Exercises ============== 1. Rewrite the program: @@ -10866,7 +10933,7 @@ be used as an array index. including a specification of how many elements or components they contain. In such languages, the declaration causes a contiguous block of memory to be allocated for that many elements. Usually, an index in -the array must be a positive integer. For example, the index zero +the array must be a nonnegative integer. For example, the index zero specifies the first element in the array, which is actually stored at the beginning of the block of memory. Index one specifies the second element, which is stored in memory right after the first element, and @@ -10921,8 +10988,8 @@ It has elements 0-3 and 10, but doesn't have elements 4, 5, 6, 7, 8, or 9. Another consequence of associative arrays is that the indices don't -have to be positive integers. Any number, or even a string, can be an -index. For example, the following is an array that translates words +have to be nonnegative integers. Any number, or even a string, can be +an index. For example, the following is an array that translates words from English to French: Index Value @@ -11093,7 +11160,7 @@ File: gawk.info, Node: Scanning an Array, Next: Controlling Scanning, Prev: A In programs that use arrays, it is often necessary to use a loop that executes once for each element of an array. In other languages, where -arrays are contiguous and indices are limited to positive integers, +arrays are contiguous and indices are limited to nonnegative integers, this is easy: all the valid indices can be found by counting from the lowest index up to the highest. This technique won't do the job in `awk', because any number or string can be an array index. So `awk' @@ -12029,7 +12096,7 @@ numbers. (2) `mawk' uses a different seed each time. (3) Computer-generated random numbers really are not truly random. -They are technically known as "pseudorandom." This means that although +They are technically known as "pseudorandom". This means that although the numbers in a sequence appear to be random, you can in fact generate the same sequence of random numbers over and over again. @@ -21836,8 +21903,7 @@ Integer arithmetic In computers, integer values come in two flavors: "signed" and "unsigned". Signed values may be negative or positive, whereas - unsigned values are always positive (i.e., greater than or equal - to zero). + unsigned values are always greater than or equal to zero. In computer systems, integer arithmetic is exact, but the possible range of values is limited. Integer arithmetic is generally @@ -26479,6 +26545,9 @@ the current version of `gawk'. - Directories on the command line produce a warning and are skipped (*note Command-line directories::) + - Output with `print' and `printf' need not be fatal (*note + Nonfatal::) + * New keywords: - The `BEGINFILE' and `ENDFILE' special patterns (*note @@ -26994,6 +27063,8 @@ in POSIX `awk', in the order they were added to `gawk'. * The maximum number of hexdecimal digits in `\x' escapes is now two. *Note Escape Sequences::. + * Nonfatal output with `print' and `printf'. *Note Nonfatal::. + * Support for MirBSD was removed. @@ -34667,560 +34738,561 @@ Index Tag Table: Node: Top1204 -Node: Foreword342225 -Node: Foreword446669 -Node: Preface48200 -Ref: Preface-Footnote-151071 -Ref: Preface-Footnote-251178 -Ref: Preface-Footnote-351411 -Node: History51553 -Node: Names53904 -Ref: Names-Footnote-154998 -Node: This Manual55144 -Ref: This Manual-Footnote-161644 -Node: Conventions61744 -Node: Manual History64081 -Ref: Manual History-Footnote-167074 -Ref: Manual History-Footnote-267115 -Node: How To Contribute67189 -Node: Acknowledgments68318 -Node: Getting Started73184 -Node: Running gawk75623 -Node: One-shot76813 -Node: Read Terminal78077 -Node: Long80108 -Node: Executable Scripts81621 -Ref: Executable Scripts-Footnote-184410 -Node: Comments84513 -Node: Quoting86995 -Node: DOS Quoting92513 -Node: Sample Data Files93188 -Node: Very Simple95783 -Node: Two Rules100682 -Node: More Complex102568 -Node: Statements/Lines105430 -Ref: Statements/Lines-Footnote-1109885 -Node: Other Features110150 -Node: When111086 -Ref: When-Footnote-1112840 -Node: Intro Summary112905 -Node: Invoking Gawk113789 -Node: Command Line115303 -Node: Options116101 -Ref: Options-Footnote-1131896 -Ref: Options-Footnote-2132125 -Node: Other Arguments132150 -Node: Naming Standard Input135098 -Node: Environment Variables136191 -Node: AWKPATH Variable136749 -Ref: AWKPATH Variable-Footnote-1140156 -Ref: AWKPATH Variable-Footnote-2140201 -Node: AWKLIBPATH Variable140461 -Node: Other Environment Variables141717 -Node: Exit Status145235 -Node: Include Files145911 -Node: Loading Shared Libraries149500 -Node: Obsolete150927 -Node: Undocumented151619 -Node: Invoking Summary151886 -Node: Regexp153549 -Node: Regexp Usage155003 -Node: Escape Sequences157040 -Node: Regexp Operators163269 -Ref: Regexp Operators-Footnote-1170679 -Ref: Regexp Operators-Footnote-2170826 -Node: Bracket Expressions170924 -Ref: table-char-classes172939 -Node: Leftmost Longest175881 -Node: Computed Regexps177183 -Node: GNU Regexp Operators180612 -Node: Case-sensitivity184284 -Ref: Case-sensitivity-Footnote-1187169 -Ref: Case-sensitivity-Footnote-2187404 -Node: Regexp Summary187512 -Node: Reading Files188979 -Node: Records191072 -Node: awk split records191805 -Node: gawk split records196734 -Ref: gawk split records-Footnote-1201273 -Node: Fields201310 -Ref: Fields-Footnote-1204088 -Node: Nonconstant Fields204174 -Ref: Nonconstant Fields-Footnote-1206412 -Node: Changing Fields206615 -Node: Field Separators212546 -Node: Default Field Splitting215250 -Node: Regexp Field Splitting216367 -Node: Single Character Fields219717 -Node: Command Line Field Separator220776 -Node: Full Line Fields223993 -Ref: Full Line Fields-Footnote-1225514 -Ref: Full Line Fields-Footnote-2225560 -Node: Field Splitting Summary225661 -Node: Constant Size227735 -Node: Splitting By Content232318 -Ref: Splitting By Content-Footnote-1236283 -Node: Multiple Line236446 -Ref: Multiple Line-Footnote-1242327 -Node: Getline242506 -Node: Plain Getline244713 -Node: Getline/Variable247353 -Node: Getline/File248502 -Node: Getline/Variable/File249887 -Ref: Getline/Variable/File-Footnote-1251490 -Node: Getline/Pipe251577 -Node: Getline/Variable/Pipe254255 -Node: Getline/Coprocess255386 -Node: Getline/Variable/Coprocess256650 -Node: Getline Notes257389 -Node: Getline Summary260183 -Ref: table-getline-variants260595 -Node: Read Timeout261424 -Ref: Read Timeout-Footnote-1265261 -Node: Command-line directories265319 -Node: Input Summary266224 -Node: Input Exercises269609 -Node: Printing270337 -Node: Print272114 -Node: Print Examples273571 -Node: Output Separators276350 -Node: OFMT278368 -Node: Printf279723 -Node: Basic Printf280508 -Node: Control Letters282080 -Node: Format Modifiers286065 -Node: Printf Examples292071 -Node: Redirection294557 -Node: Special FD301395 -Ref: Special FD-Footnote-1304561 -Node: Special Files304635 -Node: Other Inherited Files305252 -Node: Special Network306252 -Node: Special Caveats307114 -Node: Close Files And Pipes308063 -Ref: Close Files And Pipes-Footnote-1315254 -Ref: Close Files And Pipes-Footnote-2315402 -Node: Output Summary315552 -Node: Output Exercises316550 -Node: Expressions317230 -Node: Values318419 -Node: Constants319096 -Node: Scalar Constants319787 -Ref: Scalar Constants-Footnote-1320649 -Node: Nondecimal-numbers320899 -Node: Regexp Constants323909 -Node: Using Constant Regexps324435 -Node: Variables327598 -Node: Using Variables328255 -Node: Assignment Options330166 -Node: Conversion332041 -Node: Strings And Numbers332565 -Ref: Strings And Numbers-Footnote-1335630 -Node: Locale influences conversions335739 -Ref: table-locale-affects338485 -Node: All Operators339077 -Node: Arithmetic Ops339706 -Node: Concatenation342211 -Ref: Concatenation-Footnote-1345030 -Node: Assignment Ops345137 -Ref: table-assign-ops350116 -Node: Increment Ops351426 -Node: Truth Values and Conditions354857 -Node: Truth Values355940 -Node: Typing and Comparison356989 -Node: Variable Typing357805 -Node: Comparison Operators361472 -Ref: table-relational-ops361882 -Node: POSIX String Comparison365377 -Ref: POSIX String Comparison-Footnote-1366449 -Node: Boolean Ops366588 -Ref: Boolean Ops-Footnote-1371066 -Node: Conditional Exp371157 -Node: Function Calls372895 -Node: Precedence376775 -Node: Locales380435 -Node: Expressions Summary382067 -Node: Patterns and Actions384638 -Node: Pattern Overview385758 -Node: Regexp Patterns387437 -Node: Expression Patterns387980 -Node: Ranges391760 -Node: BEGIN/END394867 -Node: Using BEGIN/END395628 -Ref: Using BEGIN/END-Footnote-1398364 -Node: I/O And BEGIN/END398470 -Node: BEGINFILE/ENDFILE400785 -Node: Empty403682 -Node: Using Shell Variables403999 -Node: Action Overview406272 -Node: Statements408598 -Node: If Statement410446 -Node: While Statement411941 -Node: Do Statement413969 -Node: For Statement415117 -Node: Switch Statement418275 -Node: Break Statement420657 -Node: Continue Statement422750 -Node: Next Statement424577 -Node: Nextfile Statement426958 -Node: Exit Statement429586 -Node: Built-in Variables431997 -Node: User-modified433130 -Ref: User-modified-Footnote-1440764 -Node: Auto-set440826 -Ref: Auto-set-Footnote-1454535 -Ref: Auto-set-Footnote-2454740 -Node: ARGC and ARGV454796 -Node: Pattern Action Summary459014 -Node: Arrays461447 -Node: Array Basics462776 -Node: Array Intro463620 -Ref: figure-array-elements465554 -Ref: Array Intro-Footnote-1468174 -Node: Reference to Elements468302 -Node: Assigning Elements470764 -Node: Array Example471255 -Node: Scanning an Array473014 -Node: Controlling Scanning476034 -Ref: Controlling Scanning-Footnote-1481428 -Node: Numeric Array Subscripts481744 -Node: Uninitialized Subscripts483929 -Node: Delete485546 -Ref: Delete-Footnote-1488295 -Node: Multidimensional488352 -Node: Multiscanning491449 -Node: Arrays of Arrays493038 -Node: Arrays Summary497792 -Node: Functions499883 -Node: Built-in500922 -Node: Calling Built-in502000 -Node: Numeric Functions503995 -Ref: Numeric Functions-Footnote-1508813 -Ref: Numeric Functions-Footnote-2509170 -Ref: Numeric Functions-Footnote-3509218 -Node: String Functions509490 -Ref: String Functions-Footnote-1532991 -Ref: String Functions-Footnote-2533120 -Ref: String Functions-Footnote-3533368 -Node: Gory Details533455 -Ref: table-sub-escapes535236 -Ref: table-sub-proposed536751 -Ref: table-posix-sub538113 -Ref: table-gensub-escapes539650 -Ref: Gory Details-Footnote-1540483 -Node: I/O Functions540634 -Ref: I/O Functions-Footnote-1547870 -Node: Time Functions548017 -Ref: Time Functions-Footnote-1558526 -Ref: Time Functions-Footnote-2558594 -Ref: Time Functions-Footnote-3558752 -Ref: Time Functions-Footnote-4558863 -Ref: Time Functions-Footnote-5558975 -Ref: Time Functions-Footnote-6559202 -Node: Bitwise Functions559468 -Ref: table-bitwise-ops560030 -Ref: Bitwise Functions-Footnote-1564358 -Node: Type Functions564530 -Node: I18N Functions565682 -Node: User-defined567329 -Node: Definition Syntax568134 -Ref: Definition Syntax-Footnote-1573793 -Node: Function Example573864 -Ref: Function Example-Footnote-1576785 -Node: Function Caveats576807 -Node: Calling A Function577325 -Node: Variable Scope578283 -Node: Pass By Value/Reference581276 -Node: Return Statement584773 -Node: Dynamic Typing587752 -Node: Indirect Calls588681 -Ref: Indirect Calls-Footnote-1598546 -Node: Functions Summary598674 -Node: Library Functions601376 -Ref: Library Functions-Footnote-1604984 -Ref: Library Functions-Footnote-2605127 -Node: Library Names605298 -Ref: Library Names-Footnote-1608756 -Ref: Library Names-Footnote-2608979 -Node: General Functions609065 -Node: Strtonum Function610168 -Node: Assert Function613190 -Node: Round Function616514 -Node: Cliff Random Function618055 -Node: Ordinal Functions619071 -Ref: Ordinal Functions-Footnote-1622134 -Ref: Ordinal Functions-Footnote-2622386 -Node: Join Function622597 -Ref: Join Function-Footnote-1624367 -Node: Getlocaltime Function624567 -Node: Readfile Function628311 -Node: Shell Quoting630283 -Node: Data File Management631684 -Node: Filetrans Function632316 -Node: Rewind Function636412 -Node: File Checking637798 -Ref: File Checking-Footnote-1639131 -Node: Empty Files639332 -Node: Ignoring Assigns641311 -Node: Getopt Function642861 -Ref: Getopt Function-Footnote-1654325 -Node: Passwd Functions654525 -Ref: Passwd Functions-Footnote-1663365 -Node: Group Functions663453 -Ref: Group Functions-Footnote-1671350 -Node: Walking Arrays671555 -Node: Library Functions Summary674561 -Node: Library Exercises675963 -Node: Sample Programs677243 -Node: Running Examples678013 -Node: Clones678741 -Node: Cut Program679965 -Node: Egrep Program689685 -Ref: Egrep Program-Footnote-1697188 -Node: Id Program697298 -Node: Split Program700974 -Ref: Split Program-Footnote-1704428 -Node: Tee Program704556 -Node: Uniq Program707345 -Node: Wc Program714764 -Ref: Wc Program-Footnote-1719014 -Node: Miscellaneous Programs719108 -Node: Dupword Program720321 -Node: Alarm Program722352 -Node: Translate Program727157 -Ref: Translate Program-Footnote-1731720 -Node: Labels Program731990 -Ref: Labels Program-Footnote-1735341 -Node: Word Sorting735425 -Node: History Sorting739495 -Node: Extract Program741330 -Node: Simple Sed748854 -Node: Igawk Program751924 -Ref: Igawk Program-Footnote-1766250 -Ref: Igawk Program-Footnote-2766451 -Ref: Igawk Program-Footnote-3766573 -Node: Anagram Program766688 -Node: Signature Program769749 -Node: Programs Summary770996 -Node: Programs Exercises772217 -Ref: Programs Exercises-Footnote-1776348 -Node: Advanced Features776439 -Node: Nondecimal Data778421 -Node: Array Sorting780011 -Node: Controlling Array Traversal780711 -Ref: Controlling Array Traversal-Footnote-1789077 -Node: Array Sorting Functions789195 -Ref: Array Sorting Functions-Footnote-1793081 -Node: Two-way I/O793277 -Ref: Two-way I/O-Footnote-1798222 -Ref: Two-way I/O-Footnote-2798408 -Node: TCP/IP Networking798490 -Node: Profiling801362 -Node: Advanced Features Summary809633 -Node: Internationalization811566 -Node: I18N and L10N813046 -Node: Explaining gettext813732 -Ref: Explaining gettext-Footnote-1818757 -Ref: Explaining gettext-Footnote-2818941 -Node: Programmer i18n819106 -Ref: Programmer i18n-Footnote-1823982 -Node: Translator i18n824031 -Node: String Extraction824825 -Ref: String Extraction-Footnote-1825956 -Node: Printf Ordering826042 -Ref: Printf Ordering-Footnote-1828828 -Node: I18N Portability828892 -Ref: I18N Portability-Footnote-1831348 -Node: I18N Example831411 -Ref: I18N Example-Footnote-1834214 -Node: Gawk I18N834286 -Node: I18N Summary834930 -Node: Debugger836270 -Node: Debugging837292 -Node: Debugging Concepts837733 -Node: Debugging Terms839543 -Node: Awk Debugging842115 -Node: Sample Debugging Session843021 -Node: Debugger Invocation843555 -Node: Finding The Bug844940 -Node: List of Debugger Commands851419 -Node: Breakpoint Control852751 -Node: Debugger Execution Control856428 -Node: Viewing And Changing Data859787 -Node: Execution Stack863163 -Node: Debugger Info864798 -Node: Miscellaneous Debugger Commands868843 -Node: Readline Support873844 -Node: Limitations874738 -Node: Debugging Summary876853 -Node: Arbitrary Precision Arithmetic878027 -Node: Computer Arithmetic879443 -Ref: table-numeric-ranges883042 -Ref: Computer Arithmetic-Footnote-1883566 -Node: Math Definitions883623 -Ref: table-ieee-formats886918 -Ref: Math Definitions-Footnote-1887522 -Node: MPFR features887627 -Node: FP Math Caution889298 -Ref: FP Math Caution-Footnote-1890348 -Node: Inexactness of computations890717 -Node: Inexact representation891676 -Node: Comparing FP Values893034 -Node: Errors accumulate894116 -Node: Getting Accuracy895548 -Node: Try To Round898252 -Node: Setting precision899151 -Ref: table-predefined-precision-strings899835 -Node: Setting the rounding mode901664 -Ref: table-gawk-rounding-modes902028 -Ref: Setting the rounding mode-Footnote-1905480 -Node: Arbitrary Precision Integers905659 -Ref: Arbitrary Precision Integers-Footnote-1910557 -Node: POSIX Floating Point Problems910706 -Ref: POSIX Floating Point Problems-Footnote-1914585 -Node: Floating point summary914623 -Node: Dynamic Extensions916810 -Node: Extension Intro918362 -Node: Plugin License919627 -Node: Extension Mechanism Outline920424 -Ref: figure-load-extension920852 -Ref: figure-register-new-function922332 -Ref: figure-call-new-function923336 -Node: Extension API Description925323 -Node: Extension API Functions Introduction926773 -Node: General Data Types931594 -Ref: General Data Types-Footnote-1937494 -Node: Memory Allocation Functions937793 -Ref: Memory Allocation Functions-Footnote-1940632 -Node: Constructor Functions940731 -Node: Registration Functions942470 -Node: Extension Functions943155 -Node: Exit Callback Functions945452 -Node: Extension Version String946700 -Node: Input Parsers947363 -Node: Output Wrappers957238 -Node: Two-way processors961751 -Node: Printing Messages964014 -Ref: Printing Messages-Footnote-1965090 -Node: Updating `ERRNO'965242 -Node: Requesting Values965982 -Ref: table-value-types-returned966709 -Node: Accessing Parameters967666 -Node: Symbol Table Access968900 -Node: Symbol table by name969414 -Node: Symbol table by cookie971434 -Ref: Symbol table by cookie-Footnote-1975579 -Node: Cached values975642 -Ref: Cached values-Footnote-1979138 -Node: Array Manipulation979229 -Ref: Array Manipulation-Footnote-1980327 -Node: Array Data Types980364 -Ref: Array Data Types-Footnote-1983019 -Node: Array Functions983111 -Node: Flattening Arrays986970 -Node: Creating Arrays993872 -Node: Extension API Variables998643 -Node: Extension Versioning999279 -Node: Extension API Informational Variables1001170 -Node: Extension API Boilerplate1002235 -Node: Finding Extensions1006044 -Node: Extension Example1006604 -Node: Internal File Description1007376 -Node: Internal File Ops1011443 -Ref: Internal File Ops-Footnote-11023194 -Node: Using Internal File Ops1023334 -Ref: Using Internal File Ops-Footnote-11025717 -Node: Extension Samples1025990 -Node: Extension Sample File Functions1027518 -Node: Extension Sample Fnmatch1035199 -Node: Extension Sample Fork1036687 -Node: Extension Sample Inplace1037902 -Node: Extension Sample Ord1039578 -Node: Extension Sample Readdir1040414 -Ref: table-readdir-file-types1041291 -Node: Extension Sample Revout1042102 -Node: Extension Sample Rev2way1042691 -Node: Extension Sample Read write array1043431 -Node: Extension Sample Readfile1045371 -Node: Extension Sample Time1046466 -Node: Extension Sample API Tests1047814 -Node: gawkextlib1048305 -Node: Extension summary1050983 -Node: Extension Exercises1054672 -Node: Language History1055394 -Node: V7/SVR3.11057050 -Node: SVR41059203 -Node: POSIX1060637 -Node: BTL1062018 -Node: POSIX/GNU1062749 -Node: Feature History1068494 -Node: Common Extensions1082220 -Node: Ranges and Locales1083592 -Ref: Ranges and Locales-Footnote-11088211 -Ref: Ranges and Locales-Footnote-21088238 -Ref: Ranges and Locales-Footnote-31088473 -Node: Contributors1088694 -Node: History summary1094234 -Node: Installation1095613 -Node: Gawk Distribution1096559 -Node: Getting1097043 -Node: Extracting1097866 -Node: Distribution contents1099503 -Node: Unix Installation1105605 -Node: Quick Installation1106288 -Node: Shell Startup Files1108699 -Node: Additional Configuration Options1109778 -Node: Configuration Philosophy1111582 -Node: Non-Unix Installation1113951 -Node: PC Installation1114409 -Node: PC Binary Installation1115729 -Node: PC Compiling1117577 -Ref: PC Compiling-Footnote-11120598 -Node: PC Testing1120707 -Node: PC Using1121883 -Node: Cygwin1125998 -Node: MSYS1126768 -Node: VMS Installation1127269 -Node: VMS Compilation1128061 -Ref: VMS Compilation-Footnote-11129290 -Node: VMS Dynamic Extensions1129348 -Node: VMS Installation Details1131032 -Node: VMS Running1133283 -Node: VMS GNV1136123 -Node: VMS Old Gawk1136858 -Node: Bugs1137328 -Node: Other Versions1141217 -Node: Installation summary1147651 -Node: Notes1148710 -Node: Compatibility Mode1149575 -Node: Additions1150357 -Node: Accessing The Source1151282 -Node: Adding Code1152717 -Node: New Ports1158874 -Node: Derived Files1163356 -Ref: Derived Files-Footnote-11168831 -Ref: Derived Files-Footnote-21168865 -Ref: Derived Files-Footnote-31169461 -Node: Future Extensions1169575 -Node: Implementation Limitations1170181 -Node: Extension Design1171429 -Node: Old Extension Problems1172583 -Ref: Old Extension Problems-Footnote-11174100 -Node: Extension New Mechanism Goals1174157 -Ref: Extension New Mechanism Goals-Footnote-11177517 -Node: Extension Other Design Decisions1177706 -Node: Extension Future Growth1179814 -Node: Old Extension Mechanism1180650 -Node: Notes summary1182412 -Node: Basic Concepts1183598 -Node: Basic High Level1184279 -Ref: figure-general-flow1184551 -Ref: figure-process-flow1185150 -Ref: Basic High Level-Footnote-11188379 -Node: Basic Data Typing1188564 -Node: Glossary1191892 -Node: Copying1223821 -Node: GNU Free Documentation License1261377 -Node: Index1286513 +Node: Foreword342291 +Node: Foreword446735 +Node: Preface48266 +Ref: Preface-Footnote-151137 +Ref: Preface-Footnote-251244 +Ref: Preface-Footnote-351477 +Node: History51619 +Node: Names53970 +Ref: Names-Footnote-155064 +Node: This Manual55210 +Ref: This Manual-Footnote-161710 +Node: Conventions61810 +Node: Manual History64147 +Ref: Manual History-Footnote-167140 +Ref: Manual History-Footnote-267181 +Node: How To Contribute67255 +Node: Acknowledgments68384 +Node: Getting Started73250 +Node: Running gawk75689 +Node: One-shot76879 +Node: Read Terminal78143 +Node: Long80174 +Node: Executable Scripts81687 +Ref: Executable Scripts-Footnote-184476 +Node: Comments84579 +Node: Quoting87061 +Node: DOS Quoting92579 +Node: Sample Data Files93254 +Node: Very Simple95849 +Node: Two Rules100748 +Node: More Complex102634 +Node: Statements/Lines105496 +Ref: Statements/Lines-Footnote-1109951 +Node: Other Features110216 +Node: When111152 +Ref: When-Footnote-1112906 +Node: Intro Summary112971 +Node: Invoking Gawk113855 +Node: Command Line115369 +Node: Options116167 +Ref: Options-Footnote-1131962 +Ref: Options-Footnote-2132191 +Node: Other Arguments132216 +Node: Naming Standard Input135164 +Node: Environment Variables136257 +Node: AWKPATH Variable136815 +Ref: AWKPATH Variable-Footnote-1140222 +Ref: AWKPATH Variable-Footnote-2140267 +Node: AWKLIBPATH Variable140527 +Node: Other Environment Variables141783 +Node: Exit Status145414 +Node: Include Files146090 +Node: Loading Shared Libraries149679 +Node: Obsolete151106 +Node: Undocumented151798 +Node: Invoking Summary152065 +Node: Regexp153728 +Node: Regexp Usage155182 +Node: Escape Sequences157219 +Node: Regexp Operators163448 +Ref: Regexp Operators-Footnote-1170858 +Ref: Regexp Operators-Footnote-2171005 +Node: Bracket Expressions171103 +Ref: table-char-classes173118 +Node: Leftmost Longest176060 +Node: Computed Regexps177362 +Node: GNU Regexp Operators180791 +Node: Case-sensitivity184463 +Ref: Case-sensitivity-Footnote-1187348 +Ref: Case-sensitivity-Footnote-2187583 +Node: Regexp Summary187691 +Node: Reading Files189158 +Node: Records191251 +Node: awk split records191984 +Node: gawk split records196913 +Ref: gawk split records-Footnote-1201452 +Node: Fields201489 +Ref: Fields-Footnote-1204267 +Node: Nonconstant Fields204353 +Ref: Nonconstant Fields-Footnote-1206591 +Node: Changing Fields206794 +Node: Field Separators212725 +Node: Default Field Splitting215429 +Node: Regexp Field Splitting216546 +Node: Single Character Fields219896 +Node: Command Line Field Separator220955 +Node: Full Line Fields224172 +Ref: Full Line Fields-Footnote-1225693 +Ref: Full Line Fields-Footnote-2225739 +Node: Field Splitting Summary225840 +Node: Constant Size227914 +Node: Splitting By Content232493 +Ref: Splitting By Content-Footnote-1236458 +Node: Multiple Line236621 +Ref: Multiple Line-Footnote-1242502 +Node: Getline242681 +Node: Plain Getline244888 +Node: Getline/Variable247528 +Node: Getline/File248677 +Node: Getline/Variable/File250062 +Ref: Getline/Variable/File-Footnote-1251665 +Node: Getline/Pipe251752 +Node: Getline/Variable/Pipe254430 +Node: Getline/Coprocess255561 +Node: Getline/Variable/Coprocess256825 +Node: Getline Notes257564 +Node: Getline Summary260358 +Ref: table-getline-variants260770 +Node: Read Timeout261599 +Ref: Read Timeout-Footnote-1265436 +Node: Command-line directories265494 +Node: Input Summary266399 +Node: Input Exercises269784 +Node: Printing270512 +Node: Print272347 +Node: Print Examples273804 +Node: Output Separators276583 +Node: OFMT278601 +Node: Printf279956 +Node: Basic Printf280741 +Node: Control Letters282313 +Node: Format Modifiers286298 +Node: Printf Examples292304 +Node: Redirection294790 +Node: Special FD301628 +Ref: Special FD-Footnote-1304794 +Node: Special Files304868 +Node: Other Inherited Files305485 +Node: Special Network306485 +Node: Special Caveats307347 +Node: Close Files And Pipes308296 +Ref: Close Files And Pipes-Footnote-1315481 +Ref: Close Files And Pipes-Footnote-2315629 +Node: Nonfatal315779 +Node: Output Summary318104 +Node: Output Exercises319325 +Node: Expressions320005 +Node: Values321194 +Node: Constants321871 +Node: Scalar Constants322562 +Ref: Scalar Constants-Footnote-1323424 +Node: Nondecimal-numbers323674 +Node: Regexp Constants326684 +Node: Using Constant Regexps327210 +Node: Variables330373 +Node: Using Variables331030 +Node: Assignment Options332941 +Node: Conversion334816 +Node: Strings And Numbers335340 +Ref: Strings And Numbers-Footnote-1338405 +Node: Locale influences conversions338514 +Ref: table-locale-affects341260 +Node: All Operators341852 +Node: Arithmetic Ops342481 +Node: Concatenation344986 +Ref: Concatenation-Footnote-1347805 +Node: Assignment Ops347912 +Ref: table-assign-ops352891 +Node: Increment Ops354201 +Node: Truth Values and Conditions357632 +Node: Truth Values358715 +Node: Typing and Comparison359764 +Node: Variable Typing360580 +Node: Comparison Operators364247 +Ref: table-relational-ops364657 +Node: POSIX String Comparison368152 +Ref: POSIX String Comparison-Footnote-1369224 +Node: Boolean Ops369363 +Ref: Boolean Ops-Footnote-1373841 +Node: Conditional Exp373932 +Node: Function Calls375670 +Node: Precedence379550 +Node: Locales383210 +Node: Expressions Summary384842 +Node: Patterns and Actions387413 +Node: Pattern Overview388533 +Node: Regexp Patterns390212 +Node: Expression Patterns390755 +Node: Ranges394535 +Node: BEGIN/END397642 +Node: Using BEGIN/END398403 +Ref: Using BEGIN/END-Footnote-1401139 +Node: I/O And BEGIN/END401245 +Node: BEGINFILE/ENDFILE403560 +Node: Empty406457 +Node: Using Shell Variables406774 +Node: Action Overview409047 +Node: Statements411373 +Node: If Statement413221 +Node: While Statement414716 +Node: Do Statement416744 +Node: For Statement417892 +Node: Switch Statement421050 +Node: Break Statement423432 +Node: Continue Statement425525 +Node: Next Statement427352 +Node: Nextfile Statement429733 +Node: Exit Statement432361 +Node: Built-in Variables434772 +Node: User-modified435905 +Ref: User-modified-Footnote-1443539 +Node: Auto-set443601 +Ref: Auto-set-Footnote-1457310 +Ref: Auto-set-Footnote-2457515 +Node: ARGC and ARGV457571 +Node: Pattern Action Summary461789 +Node: Arrays464222 +Node: Array Basics465551 +Node: Array Intro466395 +Ref: figure-array-elements468332 +Ref: Array Intro-Footnote-1470955 +Node: Reference to Elements471083 +Node: Assigning Elements473545 +Node: Array Example474036 +Node: Scanning an Array475795 +Node: Controlling Scanning478818 +Ref: Controlling Scanning-Footnote-1484212 +Node: Numeric Array Subscripts484528 +Node: Uninitialized Subscripts486713 +Node: Delete488330 +Ref: Delete-Footnote-1491079 +Node: Multidimensional491136 +Node: Multiscanning494233 +Node: Arrays of Arrays495822 +Node: Arrays Summary500576 +Node: Functions502667 +Node: Built-in503706 +Node: Calling Built-in504784 +Node: Numeric Functions506779 +Ref: Numeric Functions-Footnote-1511597 +Ref: Numeric Functions-Footnote-2511954 +Ref: Numeric Functions-Footnote-3512002 +Node: String Functions512274 +Ref: String Functions-Footnote-1535775 +Ref: String Functions-Footnote-2535904 +Ref: String Functions-Footnote-3536152 +Node: Gory Details536239 +Ref: table-sub-escapes538020 +Ref: table-sub-proposed539535 +Ref: table-posix-sub540897 +Ref: table-gensub-escapes542434 +Ref: Gory Details-Footnote-1543267 +Node: I/O Functions543418 +Ref: I/O Functions-Footnote-1550654 +Node: Time Functions550801 +Ref: Time Functions-Footnote-1561310 +Ref: Time Functions-Footnote-2561378 +Ref: Time Functions-Footnote-3561536 +Ref: Time Functions-Footnote-4561647 +Ref: Time Functions-Footnote-5561759 +Ref: Time Functions-Footnote-6561986 +Node: Bitwise Functions562252 +Ref: table-bitwise-ops562814 +Ref: Bitwise Functions-Footnote-1567142 +Node: Type Functions567314 +Node: I18N Functions568466 +Node: User-defined570113 +Node: Definition Syntax570918 +Ref: Definition Syntax-Footnote-1576577 +Node: Function Example576648 +Ref: Function Example-Footnote-1579569 +Node: Function Caveats579591 +Node: Calling A Function580109 +Node: Variable Scope581067 +Node: Pass By Value/Reference584060 +Node: Return Statement587557 +Node: Dynamic Typing590536 +Node: Indirect Calls591465 +Ref: Indirect Calls-Footnote-1601330 +Node: Functions Summary601458 +Node: Library Functions604160 +Ref: Library Functions-Footnote-1607768 +Ref: Library Functions-Footnote-2607911 +Node: Library Names608082 +Ref: Library Names-Footnote-1611540 +Ref: Library Names-Footnote-2611763 +Node: General Functions611849 +Node: Strtonum Function612952 +Node: Assert Function615974 +Node: Round Function619298 +Node: Cliff Random Function620839 +Node: Ordinal Functions621855 +Ref: Ordinal Functions-Footnote-1624918 +Ref: Ordinal Functions-Footnote-2625170 +Node: Join Function625381 +Ref: Join Function-Footnote-1627151 +Node: Getlocaltime Function627351 +Node: Readfile Function631095 +Node: Shell Quoting633067 +Node: Data File Management634468 +Node: Filetrans Function635100 +Node: Rewind Function639196 +Node: File Checking640582 +Ref: File Checking-Footnote-1641915 +Node: Empty Files642116 +Node: Ignoring Assigns644095 +Node: Getopt Function645645 +Ref: Getopt Function-Footnote-1657109 +Node: Passwd Functions657309 +Ref: Passwd Functions-Footnote-1666149 +Node: Group Functions666237 +Ref: Group Functions-Footnote-1674134 +Node: Walking Arrays674339 +Node: Library Functions Summary677345 +Node: Library Exercises678747 +Node: Sample Programs680027 +Node: Running Examples680797 +Node: Clones681525 +Node: Cut Program682749 +Node: Egrep Program692469 +Ref: Egrep Program-Footnote-1699972 +Node: Id Program700082 +Node: Split Program703758 +Ref: Split Program-Footnote-1707212 +Node: Tee Program707340 +Node: Uniq Program710129 +Node: Wc Program717548 +Ref: Wc Program-Footnote-1721798 +Node: Miscellaneous Programs721892 +Node: Dupword Program723105 +Node: Alarm Program725136 +Node: Translate Program729941 +Ref: Translate Program-Footnote-1734504 +Node: Labels Program734774 +Ref: Labels Program-Footnote-1738125 +Node: Word Sorting738209 +Node: History Sorting742279 +Node: Extract Program744114 +Node: Simple Sed751638 +Node: Igawk Program754708 +Ref: Igawk Program-Footnote-1769034 +Ref: Igawk Program-Footnote-2769235 +Ref: Igawk Program-Footnote-3769357 +Node: Anagram Program769472 +Node: Signature Program772533 +Node: Programs Summary773780 +Node: Programs Exercises775001 +Ref: Programs Exercises-Footnote-1779132 +Node: Advanced Features779223 +Node: Nondecimal Data781205 +Node: Array Sorting782795 +Node: Controlling Array Traversal783495 +Ref: Controlling Array Traversal-Footnote-1791861 +Node: Array Sorting Functions791979 +Ref: Array Sorting Functions-Footnote-1795865 +Node: Two-way I/O796061 +Ref: Two-way I/O-Footnote-1801006 +Ref: Two-way I/O-Footnote-2801192 +Node: TCP/IP Networking801274 +Node: Profiling804146 +Node: Advanced Features Summary812417 +Node: Internationalization814350 +Node: I18N and L10N815830 +Node: Explaining gettext816516 +Ref: Explaining gettext-Footnote-1821541 +Ref: Explaining gettext-Footnote-2821725 +Node: Programmer i18n821890 +Ref: Programmer i18n-Footnote-1826766 +Node: Translator i18n826815 +Node: String Extraction827609 +Ref: String Extraction-Footnote-1828740 +Node: Printf Ordering828826 +Ref: Printf Ordering-Footnote-1831612 +Node: I18N Portability831676 +Ref: I18N Portability-Footnote-1834132 +Node: I18N Example834195 +Ref: I18N Example-Footnote-1836998 +Node: Gawk I18N837070 +Node: I18N Summary837714 +Node: Debugger839054 +Node: Debugging840076 +Node: Debugging Concepts840517 +Node: Debugging Terms842327 +Node: Awk Debugging844899 +Node: Sample Debugging Session845805 +Node: Debugger Invocation846339 +Node: Finding The Bug847724 +Node: List of Debugger Commands854203 +Node: Breakpoint Control855535 +Node: Debugger Execution Control859212 +Node: Viewing And Changing Data862571 +Node: Execution Stack865947 +Node: Debugger Info867582 +Node: Miscellaneous Debugger Commands871627 +Node: Readline Support876628 +Node: Limitations877522 +Node: Debugging Summary879637 +Node: Arbitrary Precision Arithmetic880811 +Node: Computer Arithmetic882227 +Ref: table-numeric-ranges885804 +Ref: Computer Arithmetic-Footnote-1886328 +Node: Math Definitions886385 +Ref: table-ieee-formats889680 +Ref: Math Definitions-Footnote-1890284 +Node: MPFR features890389 +Node: FP Math Caution892060 +Ref: FP Math Caution-Footnote-1893110 +Node: Inexactness of computations893479 +Node: Inexact representation894438 +Node: Comparing FP Values895796 +Node: Errors accumulate896878 +Node: Getting Accuracy898310 +Node: Try To Round901014 +Node: Setting precision901913 +Ref: table-predefined-precision-strings902597 +Node: Setting the rounding mode904426 +Ref: table-gawk-rounding-modes904790 +Ref: Setting the rounding mode-Footnote-1908242 +Node: Arbitrary Precision Integers908421 +Ref: Arbitrary Precision Integers-Footnote-1913319 +Node: POSIX Floating Point Problems913468 +Ref: POSIX Floating Point Problems-Footnote-1917347 +Node: Floating point summary917385 +Node: Dynamic Extensions919572 +Node: Extension Intro921124 +Node: Plugin License922389 +Node: Extension Mechanism Outline923186 +Ref: figure-load-extension923614 +Ref: figure-register-new-function925094 +Ref: figure-call-new-function926098 +Node: Extension API Description928085 +Node: Extension API Functions Introduction929535 +Node: General Data Types934356 +Ref: General Data Types-Footnote-1940256 +Node: Memory Allocation Functions940555 +Ref: Memory Allocation Functions-Footnote-1943394 +Node: Constructor Functions943493 +Node: Registration Functions945232 +Node: Extension Functions945917 +Node: Exit Callback Functions948214 +Node: Extension Version String949462 +Node: Input Parsers950125 +Node: Output Wrappers960000 +Node: Two-way processors964513 +Node: Printing Messages966776 +Ref: Printing Messages-Footnote-1967852 +Node: Updating `ERRNO'968004 +Node: Requesting Values968744 +Ref: table-value-types-returned969471 +Node: Accessing Parameters970428 +Node: Symbol Table Access971662 +Node: Symbol table by name972176 +Node: Symbol table by cookie974196 +Ref: Symbol table by cookie-Footnote-1978341 +Node: Cached values978404 +Ref: Cached values-Footnote-1981900 +Node: Array Manipulation981991 +Ref: Array Manipulation-Footnote-1983089 +Node: Array Data Types983126 +Ref: Array Data Types-Footnote-1985781 +Node: Array Functions985873 +Node: Flattening Arrays989732 +Node: Creating Arrays996634 +Node: Extension API Variables1001405 +Node: Extension Versioning1002041 +Node: Extension API Informational Variables1003932 +Node: Extension API Boilerplate1004997 +Node: Finding Extensions1008806 +Node: Extension Example1009366 +Node: Internal File Description1010138 +Node: Internal File Ops1014205 +Ref: Internal File Ops-Footnote-11025956 +Node: Using Internal File Ops1026096 +Ref: Using Internal File Ops-Footnote-11028479 +Node: Extension Samples1028752 +Node: Extension Sample File Functions1030280 +Node: Extension Sample Fnmatch1037961 +Node: Extension Sample Fork1039449 +Node: Extension Sample Inplace1040664 +Node: Extension Sample Ord1042340 +Node: Extension Sample Readdir1043176 +Ref: table-readdir-file-types1044053 +Node: Extension Sample Revout1044864 +Node: Extension Sample Rev2way1045453 +Node: Extension Sample Read write array1046193 +Node: Extension Sample Readfile1048133 +Node: Extension Sample Time1049228 +Node: Extension Sample API Tests1050576 +Node: gawkextlib1051067 +Node: Extension summary1053745 +Node: Extension Exercises1057434 +Node: Language History1058156 +Node: V7/SVR3.11059812 +Node: SVR41061965 +Node: POSIX1063399 +Node: BTL1064780 +Node: POSIX/GNU1065511 +Node: Feature History1071347 +Node: Common Extensions1085141 +Node: Ranges and Locales1086513 +Ref: Ranges and Locales-Footnote-11091132 +Ref: Ranges and Locales-Footnote-21091159 +Ref: Ranges and Locales-Footnote-31091394 +Node: Contributors1091615 +Node: History summary1097155 +Node: Installation1098534 +Node: Gawk Distribution1099480 +Node: Getting1099964 +Node: Extracting1100787 +Node: Distribution contents1102424 +Node: Unix Installation1108526 +Node: Quick Installation1109209 +Node: Shell Startup Files1111620 +Node: Additional Configuration Options1112699 +Node: Configuration Philosophy1114503 +Node: Non-Unix Installation1116872 +Node: PC Installation1117330 +Node: PC Binary Installation1118650 +Node: PC Compiling1120498 +Ref: PC Compiling-Footnote-11123519 +Node: PC Testing1123628 +Node: PC Using1124804 +Node: Cygwin1128919 +Node: MSYS1129689 +Node: VMS Installation1130190 +Node: VMS Compilation1130982 +Ref: VMS Compilation-Footnote-11132211 +Node: VMS Dynamic Extensions1132269 +Node: VMS Installation Details1133953 +Node: VMS Running1136204 +Node: VMS GNV1139044 +Node: VMS Old Gawk1139779 +Node: Bugs1140249 +Node: Other Versions1144138 +Node: Installation summary1150572 +Node: Notes1151631 +Node: Compatibility Mode1152496 +Node: Additions1153278 +Node: Accessing The Source1154203 +Node: Adding Code1155638 +Node: New Ports1161795 +Node: Derived Files1166277 +Ref: Derived Files-Footnote-11171752 +Ref: Derived Files-Footnote-21171786 +Ref: Derived Files-Footnote-31172382 +Node: Future Extensions1172496 +Node: Implementation Limitations1173102 +Node: Extension Design1174350 +Node: Old Extension Problems1175504 +Ref: Old Extension Problems-Footnote-11177021 +Node: Extension New Mechanism Goals1177078 +Ref: Extension New Mechanism Goals-Footnote-11180438 +Node: Extension Other Design Decisions1180627 +Node: Extension Future Growth1182735 +Node: Old Extension Mechanism1183571 +Node: Notes summary1185333 +Node: Basic Concepts1186519 +Node: Basic High Level1187200 +Ref: figure-general-flow1187472 +Ref: figure-process-flow1188071 +Ref: Basic High Level-Footnote-11191300 +Node: Basic Data Typing1191485 +Node: Glossary1194813 +Node: Copying1226742 +Node: GNU Free Documentation License1264298 +Node: Index1289434 End Tag Table |