From 2a63ca5d9af44de631e7853c8320357c6f5d6a3a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 6 Nov 2011 22:02:31 +0200 Subject: Improve discussion of sorted for traversal. --- doc/gawk.info | 501 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 264 insertions(+), 237 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 0606273e..53fe12d8 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -10203,7 +10203,7 @@ File: gawk.info, Node: Multi-scanning, Up: Multi-dimensional -------------------------------------- There is no special `for' statement for scanning a "multidimensional" -array. There cannot be one, because, in truth, there are no +array. There cannot be one, because, in truth, `awk' does not have multidimensional arrays or elements--there is only a multidimensional _way of accessing_ an array. @@ -10223,7 +10223,7 @@ in the array, and splits it into the individual indices by breaking it apart where the value of `SUBSEP' appears. The individual indices then become the elements of the array `separate'. - Thus, if a value is previously stored in `array[1, "foo"]'; then an + Thus, if a value is previously stored in `array[1, "foo"]', then an element with index `"1\034foo"' exists in `array'. (Recall that the default value of `SUBSEP' is the character with code 034.) Sooner or later, the `for' statement finds that index and does an iteration with @@ -10242,8 +10242,9 @@ File: gawk.info, Node: Arrays of Arrays, Prev: Multi-dimensional, Up: Arrays 8.6 Arrays of Arrays ==================== -`gawk' supports arrays of arrays. Elements of a subarray are referred -to by their own indices enclosed in square brackets, just like the +`gawk' goes beyond standard `awk''s multidimensional array access and +provides true arrays of arrays. Elements of a subarray are referred to +by their own indices enclosed in square brackets, just like the elements of the main array. For example, the following creates a two-element subarray at index `1' of the main array `a': @@ -13603,7 +13604,7 @@ of the previous functions: -| data[10] = one -| data[20] = two -| - -| Sort function: cmp_num_str_val Sort all numbers before all strings + -| Sort function: cmp_num_str_val Sort all numeric values before all strings -| data[one] = 10 -| data[two] = 20 -| data[100] = 100 @@ -13611,7 +13612,7 @@ of the previous functions: -| data[20] = two Consider sorting the entries of a GNU/Linux system password file -according to login names. The following program sorts records by a +according to login name. The following program sorts records by a specific field position and can be used for this purpose: # sort.awk --- simple program to sort by field position @@ -13727,13 +13728,17 @@ based on comparing the indices in ascending order," or "sort based on comparing the values in descending order." Having to write a simple comparison function for this purpose for use in all of your programs becomes tedious. For the common simple cases, `gawk' provides the -option of supplying special names that do the requested sorting for you. +option of using special names that do the requested sorting for you. You can think of them as "predefined" sorting functions, if you like, although the names purposely include characters that are not valid in real `awk' function names. The following special values are available: +`"@unsorted"' + Array elements are processed in arbitrary order, which is the + default `awk' behavior. + `"@ind_str_asc"' Order by indices compared as strings; this is the most basic sort. (Internally, array indices are always strings, so with `a[2*5] = 1' @@ -13759,7 +13764,8 @@ real `awk' function names. compared as numbers. Subarrays, if present, come out last. When numeric values are equal, the string values are used to provide an ordering: this guarantees consistent results across different - versions of the C `qsort()' function.(1) + versions of the C `qsort()' function(1), which `gawk' uses + internally to perform the sorting. `"@ind_str_desc"' Reverse order from the most basic sort. @@ -13778,12 +13784,6 @@ real `awk' function names. Element values, treated as numbers, ordered from high to low. Subarrays, if present, come out first. -`"@unsorted"' - Array elements are processed in arbitrary order, which is the - normal `awk' behavior. You can also get the normal behavior by just - deleting the `"sorted_in"' element from the `PROCINFO' array, if - it previously had a value assigned to it. - The array traversal order is determined before the `for' loop starts to run. Changing `PROCINFO["sorted_in"]' in the loop body will not affect the loop. @@ -13814,6 +13814,31 @@ value, regardless of what the subarray itself contains, and all subarrays are treated as being equal to each other. Their order relative to each other is determined by their index strings. + Here are some additional things to bear in mind about sorted array +traversal. + + * The value of `PROCINFO["sorted_in"]' is global. That is, it affects + all array traversal `for' loops. If you need to change it within + your own function, you should see if it's defined and save and + restore the value: + + function myfunct(p1, p2, save_sorted) + { + ... + if ("sorted_in" in PROCINFO) { + save_sorted = PROCINFO["sorted_in"] + PROCINFO["sorted_in"] = "@val_str_desc" # or whatever + } + ... + if (save_sorted) + PROCINFO["sorted_in"] = save_sorted + } + + * As mentioned, the default array traversal order is represented by + `"@unsorted"'. You can also get the default behavior by assigning + the null string to `PROCINFO["sorted_in"]' or by just deleting the + `"sorted_in"' element from the `PROCINFO' array. + ---------- Footnotes ---------- (1) When two elements compare as equal, the C `qsort()' function @@ -13842,7 +13867,9 @@ String Functions::) for sorting arrays. For example: After the call to `asort()', the array `data' is indexed from 1 to some number N, the total number of elements in `data'. (This count is `asort()''s return value.) `data[1]' <= `data[2]' <= `data[3]', and so -on. The array elements are compared as strings. +on. The comparison is based on the type of the elements (*note Typing +and Comparison::). All numeric values come before all string values, +which in turn come before all subarrays. An important side effect of calling `asort()' is that _the array's original indices are irrevocably lost_. As this isn't always @@ -25015,7 +25042,7 @@ Index * arrays, sorting: Array Sorting Functions. (line 6) * arrays, sorting, IGNORECASE variable and: Array Sorting Functions. - (line 78) + (line 80) * arrays, sparse: Array Intro. (line 71) * arrays, subscripts: Numeric Array Subscripts. (line 6) @@ -26060,7 +26087,7 @@ Index * gawk, functions, adding: Dynamic Extensions. (line 10) * gawk, hexadecimal numbers and: Nondecimal-numbers. (line 42) * gawk, IGNORECASE variable in <1>: Array Sorting Functions. - (line 78) + (line 80) * gawk, IGNORECASE variable in <2>: String Functions. (line 29) * gawk, IGNORECASE variable in <3>: Array Intro. (line 92) * gawk, IGNORECASE variable in <4>: User-modified. (line 82) @@ -26220,13 +26247,13 @@ Index * igawk.sh program: Igawk Program. (line 124) * ignore debugger command: Breakpoint Control. (line 86) * IGNORECASE variable <1>: Array Sorting Functions. - (line 78) + (line 80) * IGNORECASE variable <2>: String Functions. (line 29) * IGNORECASE variable <3>: Array Intro. (line 92) * IGNORECASE variable <4>: User-modified. (line 82) * IGNORECASE variable: Case-sensitivity. (line 26) * IGNORECASE variable, array sorting and: Array Sorting Functions. - (line 78) + (line 80) * IGNORECASE variable, array subscripts and: Array Intro. (line 92) * IGNORECASE variable, in example programs: Library Functions. (line 42) @@ -26909,7 +26936,7 @@ Index * redirection of input: Getline/File. (line 6) * redirection of output: Redirection. (line 6) * reference counting, sorting arrays: Array Sorting Functions. - (line 72) + (line 74) * regexp constants <1>: Comparison Operators. (line 103) * regexp constants <2>: Regexp Constants. (line 6) @@ -27068,7 +27095,7 @@ Index * side effects, array indexing: Reference to Elements. (line 42) * side effects, asort() function: Array Sorting Functions. - (line 22) + (line 24) * side effects, assignment expressions: Assignment Ops. (line 23) * side effects, Boolean operators: Boolean Ops. (line 30) * side effects, conditional expressions: Conditional Exp. (line 22) @@ -27647,221 +27674,221 @@ Node: Numeric Array Subscripts424017 Node: Uninitialized Subscripts426200 Node: Multi-dimensional427828 Node: Multi-scanning430922 -Node: Arrays of Arrays432506 -Node: Functions437083 -Node: Built-in437905 -Node: Calling Built-in438983 -Node: Numeric Functions440971 -Ref: Numeric Functions-Footnote-1444736 -Ref: Numeric Functions-Footnote-2445093 -Ref: Numeric Functions-Footnote-3445141 -Node: String Functions445410 -Ref: String Functions-Footnote-1468907 -Ref: String Functions-Footnote-2469036 -Ref: String Functions-Footnote-3469284 -Node: Gory Details469371 -Ref: table-sub-escapes471050 -Ref: table-sub-posix-92472404 -Ref: table-sub-proposed473747 -Ref: table-posix-sub475097 -Ref: table-gensub-escapes476643 -Ref: Gory Details-Footnote-1477850 -Ref: Gory Details-Footnote-2477901 -Node: I/O Functions478052 -Ref: I/O Functions-Footnote-1484707 -Node: Time Functions484854 -Ref: Time Functions-Footnote-1495746 -Ref: Time Functions-Footnote-2495814 -Ref: Time Functions-Footnote-3495972 -Ref: Time Functions-Footnote-4496083 -Ref: Time Functions-Footnote-5496195 -Ref: Time Functions-Footnote-6496422 -Node: Bitwise Functions496688 -Ref: table-bitwise-ops497246 -Ref: Bitwise Functions-Footnote-1501406 -Node: Type Functions501590 -Node: I18N Functions502060 -Node: User-defined503687 -Node: Definition Syntax504491 -Ref: Definition Syntax-Footnote-1509401 -Node: Function Example509470 -Node: Function Caveats512064 -Node: Calling A Function512485 -Node: Variable Scope513600 -Node: Pass By Value/Reference515575 -Node: Return Statement519015 -Node: Dynamic Typing521996 -Node: Indirect Calls522731 -Node: Internationalization532416 -Node: I18N and L10N533842 -Node: Explaining gettext534528 -Ref: Explaining gettext-Footnote-1539594 -Ref: Explaining gettext-Footnote-2539778 -Node: Programmer i18n539943 -Node: Translator i18n544143 -Node: String Extraction544936 -Ref: String Extraction-Footnote-1545897 -Node: Printf Ordering545983 -Ref: Printf Ordering-Footnote-1548767 -Node: I18N Portability548831 -Ref: I18N Portability-Footnote-1551280 -Node: I18N Example551343 -Ref: I18N Example-Footnote-1553978 -Node: Gawk I18N554050 -Node: Advanced Features554667 -Node: Nondecimal Data556180 -Node: Array Sorting557763 -Node: Controlling Array Traversal558463 -Node: Controlling Scanning With A Function559210 -Node: Controlling Scanning566913 -Ref: Controlling Scanning-Footnote-1570714 -Node: Array Sorting Functions571030 -Ref: Array Sorting Functions-Footnote-1574546 -Ref: Array Sorting Functions-Footnote-2574639 -Node: Two-way I/O574833 -Ref: Two-way I/O-Footnote-1580265 -Node: TCP/IP Networking580335 -Node: Profiling583179 -Node: Library Functions590653 -Ref: Library Functions-Footnote-1593660 -Node: Library Names593831 -Ref: Library Names-Footnote-1597302 -Ref: Library Names-Footnote-2597522 -Node: General Functions597608 -Node: Strtonum Function598561 -Node: Assert Function601491 -Node: Round Function604817 -Node: Cliff Random Function606360 -Node: Ordinal Functions607376 -Ref: Ordinal Functions-Footnote-1610446 -Ref: Ordinal Functions-Footnote-2610698 -Node: Join Function610907 -Ref: Join Function-Footnote-1612678 -Node: Gettimeofday Function612878 -Node: Data File Management616593 -Node: Filetrans Function617225 -Node: Rewind Function621364 -Node: File Checking622751 -Node: Empty Files623845 -Node: Ignoring Assigns626075 -Node: Getopt Function627628 -Ref: Getopt Function-Footnote-1638932 -Node: Passwd Functions639135 -Ref: Passwd Functions-Footnote-1648110 -Node: Group Functions648198 -Node: Walking Arrays656282 -Node: Sample Programs657851 -Node: Running Examples658516 -Node: Clones659244 -Node: Cut Program660468 -Node: Egrep Program670313 -Ref: Egrep Program-Footnote-1678086 -Node: Id Program678196 -Node: Split Program681812 -Ref: Split Program-Footnote-1685331 -Node: Tee Program685459 -Node: Uniq Program688262 -Node: Wc Program695691 -Ref: Wc Program-Footnote-1699957 -Ref: Wc Program-Footnote-2700157 -Node: Miscellaneous Programs700249 -Node: Dupword Program701437 -Node: Alarm Program703468 -Node: Translate Program708217 -Ref: Translate Program-Footnote-1712604 -Ref: Translate Program-Footnote-2712832 -Node: Labels Program712966 -Ref: Labels Program-Footnote-1716337 -Node: Word Sorting716421 -Node: History Sorting720305 -Node: Extract Program722144 -Ref: Extract Program-Footnote-1729627 -Node: Simple Sed729755 -Node: Igawk Program732817 -Ref: Igawk Program-Footnote-1747974 -Ref: Igawk Program-Footnote-2748175 -Node: Anagram Program748313 -Node: Signature Program751381 -Node: Debugger752481 -Node: Debugging753392 -Node: Debugging Concepts753805 -Node: Debugging Terms755661 -Node: Awk Debugging758284 -Node: Sample dgawk session759176 -Node: dgawk invocation759668 -Node: Finding The Bug760850 -Node: List of Debugger Commands767336 -Node: Breakpoint Control768647 -Node: Dgawk Execution Control772283 -Node: Viewing And Changing Data775634 -Node: Dgawk Stack778971 -Node: Dgawk Info780431 -Node: Miscellaneous Dgawk Commands784379 -Node: Readline Support789807 -Node: Dgawk Limitations790645 -Node: Language History792834 -Node: V7/SVR3.1794346 -Node: SVR4796667 -Node: POSIX798109 -Node: BTL799117 -Node: POSIX/GNU799851 -Node: Common Extensions805002 -Node: Ranges and Locales806109 -Ref: Ranges and Locales-Footnote-1810716 -Node: Contributors810937 -Node: Installation815199 -Node: Gawk Distribution816093 -Node: Getting816577 -Node: Extracting817403 -Node: Distribution contents819095 -Node: Unix Installation824317 -Node: Quick Installation824934 -Node: Additional Configuration Options826896 -Node: Configuration Philosophy828373 -Node: Non-Unix Installation830715 -Node: PC Installation831173 -Node: PC Binary Installation832472 -Node: PC Compiling834320 -Node: PC Testing837264 -Node: PC Using838440 -Node: Cygwin842625 -Node: MSYS843625 -Node: VMS Installation844139 -Node: VMS Compilation844742 -Ref: VMS Compilation-Footnote-1845749 -Node: VMS Installation Details845807 -Node: VMS Running847442 -Node: VMS Old Gawk849049 -Node: Bugs849523 -Node: Other Versions853375 -Node: Notes858656 -Node: Compatibility Mode859348 -Node: Additions860131 -Node: Accessing The Source860943 -Node: Adding Code862368 -Node: New Ports868335 -Node: Dynamic Extensions872448 -Node: Internals873824 -Node: Plugin License882927 -Node: Sample Library883561 -Node: Internal File Description884247 -Node: Internal File Ops887962 -Ref: Internal File Ops-Footnote-1892743 -Node: Using Internal File Ops892883 -Node: Future Extensions895260 -Node: Basic Concepts897764 -Node: Basic High Level898521 -Ref: Basic High Level-Footnote-1902556 -Node: Basic Data Typing902741 -Node: Floating Point Issues907266 -Node: String Conversion Precision908349 -Ref: String Conversion Precision-Footnote-1910049 -Node: Unexpected Results910158 -Node: POSIX Floating Point Problems911984 -Ref: POSIX Floating Point Problems-Footnote-1915689 -Node: Glossary915727 -Node: Copying940703 -Node: GNU Free Documentation License978260 -Node: Index1003397 +Node: Arrays of Arrays432513 +Node: Functions437158 +Node: Built-in437980 +Node: Calling Built-in439058 +Node: Numeric Functions441046 +Ref: Numeric Functions-Footnote-1444811 +Ref: Numeric Functions-Footnote-2445168 +Ref: Numeric Functions-Footnote-3445216 +Node: String Functions445485 +Ref: String Functions-Footnote-1468982 +Ref: String Functions-Footnote-2469111 +Ref: String Functions-Footnote-3469359 +Node: Gory Details469446 +Ref: table-sub-escapes471125 +Ref: table-sub-posix-92472479 +Ref: table-sub-proposed473822 +Ref: table-posix-sub475172 +Ref: table-gensub-escapes476718 +Ref: Gory Details-Footnote-1477925 +Ref: Gory Details-Footnote-2477976 +Node: I/O Functions478127 +Ref: I/O Functions-Footnote-1484782 +Node: Time Functions484929 +Ref: Time Functions-Footnote-1495821 +Ref: Time Functions-Footnote-2495889 +Ref: Time Functions-Footnote-3496047 +Ref: Time Functions-Footnote-4496158 +Ref: Time Functions-Footnote-5496270 +Ref: Time Functions-Footnote-6496497 +Node: Bitwise Functions496763 +Ref: table-bitwise-ops497321 +Ref: Bitwise Functions-Footnote-1501481 +Node: Type Functions501665 +Node: I18N Functions502135 +Node: User-defined503762 +Node: Definition Syntax504566 +Ref: Definition Syntax-Footnote-1509476 +Node: Function Example509545 +Node: Function Caveats512139 +Node: Calling A Function512560 +Node: Variable Scope513675 +Node: Pass By Value/Reference515650 +Node: Return Statement519090 +Node: Dynamic Typing522071 +Node: Indirect Calls522806 +Node: Internationalization532491 +Node: I18N and L10N533917 +Node: Explaining gettext534603 +Ref: Explaining gettext-Footnote-1539669 +Ref: Explaining gettext-Footnote-2539853 +Node: Programmer i18n540018 +Node: Translator i18n544218 +Node: String Extraction545011 +Ref: String Extraction-Footnote-1545972 +Node: Printf Ordering546058 +Ref: Printf Ordering-Footnote-1548842 +Node: I18N Portability548906 +Ref: I18N Portability-Footnote-1551355 +Node: I18N Example551418 +Ref: I18N Example-Footnote-1554053 +Node: Gawk I18N554125 +Node: Advanced Features554742 +Node: Nondecimal Data556255 +Node: Array Sorting557838 +Node: Controlling Array Traversal558538 +Node: Controlling Scanning With A Function559285 +Node: Controlling Scanning566994 +Ref: Controlling Scanning-Footnote-1571648 +Node: Array Sorting Functions571964 +Ref: Array Sorting Functions-Footnote-1575613 +Ref: Array Sorting Functions-Footnote-2575706 +Node: Two-way I/O575900 +Ref: Two-way I/O-Footnote-1581332 +Node: TCP/IP Networking581402 +Node: Profiling584246 +Node: Library Functions591720 +Ref: Library Functions-Footnote-1594727 +Node: Library Names594898 +Ref: Library Names-Footnote-1598369 +Ref: Library Names-Footnote-2598589 +Node: General Functions598675 +Node: Strtonum Function599628 +Node: Assert Function602558 +Node: Round Function605884 +Node: Cliff Random Function607427 +Node: Ordinal Functions608443 +Ref: Ordinal Functions-Footnote-1611513 +Ref: Ordinal Functions-Footnote-2611765 +Node: Join Function611974 +Ref: Join Function-Footnote-1613745 +Node: Gettimeofday Function613945 +Node: Data File Management617660 +Node: Filetrans Function618292 +Node: Rewind Function622431 +Node: File Checking623818 +Node: Empty Files624912 +Node: Ignoring Assigns627142 +Node: Getopt Function628695 +Ref: Getopt Function-Footnote-1639999 +Node: Passwd Functions640202 +Ref: Passwd Functions-Footnote-1649177 +Node: Group Functions649265 +Node: Walking Arrays657349 +Node: Sample Programs658918 +Node: Running Examples659583 +Node: Clones660311 +Node: Cut Program661535 +Node: Egrep Program671380 +Ref: Egrep Program-Footnote-1679153 +Node: Id Program679263 +Node: Split Program682879 +Ref: Split Program-Footnote-1686398 +Node: Tee Program686526 +Node: Uniq Program689329 +Node: Wc Program696758 +Ref: Wc Program-Footnote-1701024 +Ref: Wc Program-Footnote-2701224 +Node: Miscellaneous Programs701316 +Node: Dupword Program702504 +Node: Alarm Program704535 +Node: Translate Program709284 +Ref: Translate Program-Footnote-1713671 +Ref: Translate Program-Footnote-2713899 +Node: Labels Program714033 +Ref: Labels Program-Footnote-1717404 +Node: Word Sorting717488 +Node: History Sorting721372 +Node: Extract Program723211 +Ref: Extract Program-Footnote-1730694 +Node: Simple Sed730822 +Node: Igawk Program733884 +Ref: Igawk Program-Footnote-1749041 +Ref: Igawk Program-Footnote-2749242 +Node: Anagram Program749380 +Node: Signature Program752448 +Node: Debugger753548 +Node: Debugging754459 +Node: Debugging Concepts754872 +Node: Debugging Terms756728 +Node: Awk Debugging759351 +Node: Sample dgawk session760243 +Node: dgawk invocation760735 +Node: Finding The Bug761917 +Node: List of Debugger Commands768403 +Node: Breakpoint Control769714 +Node: Dgawk Execution Control773350 +Node: Viewing And Changing Data776701 +Node: Dgawk Stack780038 +Node: Dgawk Info781498 +Node: Miscellaneous Dgawk Commands785446 +Node: Readline Support790874 +Node: Dgawk Limitations791712 +Node: Language History793901 +Node: V7/SVR3.1795413 +Node: SVR4797734 +Node: POSIX799176 +Node: BTL800184 +Node: POSIX/GNU800918 +Node: Common Extensions806069 +Node: Ranges and Locales807176 +Ref: Ranges and Locales-Footnote-1811783 +Node: Contributors812004 +Node: Installation816266 +Node: Gawk Distribution817160 +Node: Getting817644 +Node: Extracting818470 +Node: Distribution contents820162 +Node: Unix Installation825384 +Node: Quick Installation826001 +Node: Additional Configuration Options827963 +Node: Configuration Philosophy829440 +Node: Non-Unix Installation831782 +Node: PC Installation832240 +Node: PC Binary Installation833539 +Node: PC Compiling835387 +Node: PC Testing838331 +Node: PC Using839507 +Node: Cygwin843692 +Node: MSYS844692 +Node: VMS Installation845206 +Node: VMS Compilation845809 +Ref: VMS Compilation-Footnote-1846816 +Node: VMS Installation Details846874 +Node: VMS Running848509 +Node: VMS Old Gawk850116 +Node: Bugs850590 +Node: Other Versions854442 +Node: Notes859723 +Node: Compatibility Mode860415 +Node: Additions861198 +Node: Accessing The Source862010 +Node: Adding Code863435 +Node: New Ports869402 +Node: Dynamic Extensions873515 +Node: Internals874891 +Node: Plugin License883994 +Node: Sample Library884628 +Node: Internal File Description885314 +Node: Internal File Ops889029 +Ref: Internal File Ops-Footnote-1893810 +Node: Using Internal File Ops893950 +Node: Future Extensions896327 +Node: Basic Concepts898831 +Node: Basic High Level899588 +Ref: Basic High Level-Footnote-1903623 +Node: Basic Data Typing903808 +Node: Floating Point Issues908333 +Node: String Conversion Precision909416 +Ref: String Conversion Precision-Footnote-1911116 +Node: Unexpected Results911225 +Node: POSIX Floating Point Problems913051 +Ref: POSIX Floating Point Problems-Footnote-1916756 +Node: Glossary916794 +Node: Copying941770 +Node: GNU Free Documentation License979327 +Node: Index1004464  End Tag Table -- cgit v1.2.3 From 3f6a81b5812d5f527aea23e77754732374a10c55 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 8 Nov 2011 21:20:26 +0200 Subject: More documentation changes. --- doc/gawk.info | 2014 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 984 insertions(+), 1030 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 53fe12d8..06133a6b 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -15,7 +15,7 @@ Foundation, Inc. This is Edition 4 of `GAWK: Effective AWK Programming: A User's -Guide for GNU Awk', for the 4.0.0 (or later) version of the GNU +Guide for GNU Awk', for the 4.0.1 (or later) version of the GNU implementation of AWK. Permission is granted to copy, distribute and/or modify this document @@ -47,7 +47,7 @@ Foundation, Inc. This is Edition 4 of `GAWK: Effective AWK Programming: A User's -Guide for GNU Awk', for the 4.0.0 (or later) version of the GNU +Guide for GNU Awk', for the 4.0.1 (or later) version of the GNU implementation of AWK. Permission is granted to copy, distribute and/or modify this document @@ -109,439 +109,399 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * GNU Free Documentation License:: The license for this Info file. * Index:: Concept and Variable Index. -* History:: The history of `gawk' and - `awk'. -* Names:: What name to use to find `awk'. -* This Manual:: Using this Info file. Includes - sample input files that you can use. -* Conventions:: Typographical Conventions. -* Manual History:: Brief history of the GNU project and - this Info file. -* How To Contribute:: Helping to save the world. -* Acknowledgments:: Acknowledgments. -* Running gawk:: How to run `gawk' programs; - includes command-line syntax. -* One-shot:: Running a short throwaway `awk' - program. -* Read Terminal:: Using no input files (input from - terminal instead). -* Long:: Putting permanent `awk' - programs in files. -* Executable Scripts:: Making self-contained `awk' - programs. -* Comments:: Adding documentation to `gawk' - programs. -* Quoting:: More discussion of shell quoting - issues. -* DOS Quoting:: Quoting in Windows Batch Files. -* Sample Data Files:: Sample data files for use in the - `awk' programs illustrated in - this Info file. -* Very Simple:: A very simple example. -* Two Rules:: A less simple one-line example using - two rules. -* More Complex:: A more complex example. -* Statements/Lines:: Subdividing or combining statements - into lines. -* Other Features:: Other Features of `awk'. -* When:: When to use `gawk' and when to - use other things. -* Command Line:: How to run `awk'. -* Options:: Command-line options and their - meanings. -* Other Arguments:: Input file names and variable - assignments. -* Naming Standard Input:: How to specify standard input with - other files. -* Environment Variables:: The environment variables - `gawk' uses. -* AWKPATH Variable:: Searching directories for `awk' - programs. -* Other Environment Variables:: The environment variables. -* Exit Status:: `gawk''s exit status. -* Include Files:: Including other files into your - program. -* Obsolete:: Obsolete Options and/or features. -* Undocumented:: Undocumented Options and Features. -* Regexp Usage:: How to Use Regular Expressions. -* Escape Sequences:: How to write nonprinting characters. -* Regexp Operators:: Regular Expression Operators. -* Bracket Expressions:: What can go between `[...]'. -* GNU Regexp Operators:: Operators specific to GNU software. -* Case-sensitivity:: How to do case-insensitive matching. -* Leftmost Longest:: How much text matches. -* Computed Regexps:: Using Dynamic Regexps. -* Records:: Controlling how data is split into - records. -* Fields:: An introduction to fields. -* Nonconstant Fields:: Nonconstant Field Numbers. -* Changing Fields:: Changing the Contents of a Field. -* Field Separators:: The field separator and how to change - it. -* Default Field Splitting:: How fields are normally separated. -* Regexp Field Splitting:: Using regexps as the field separator. -* Single Character Fields:: Making each character a separate field. -* Command Line Field Separator:: Setting `FS' from the - command-line. -* Field Splitting Summary:: Some final points and a summary table. -* Constant Size:: Reading constant width data. -* Splitting By Content:: Defining Fields By Content -* Multiple Line:: Reading multi-line records. -* Getline:: Reading files under explicit program - control using the `getline' - function. -* Plain Getline:: Using `getline' with no arguments. -* Getline/Variable:: Using `getline' into a variable. -* Getline/File:: Using `getline' from a file. -* Getline/Variable/File:: Using `getline' into a variable - from a file. -* Getline/Pipe:: Using `getline' from a pipe. -* Getline/Variable/Pipe:: Using `getline' into a variable - from a pipe. -* Getline/Coprocess:: Using `getline' from a coprocess. -* Getline/Variable/Coprocess:: Using `getline' into a variable - from a coprocess. -* Getline Notes:: Important things to know about - `getline'. -* Getline Summary:: Summary of `getline' Variants. -* Command line directories:: What happens if you put a directory on - the command line. -* Print:: The `print' statement. -* Print Examples:: Simple examples of `print' - statements. -* Output Separators:: The output separators and how to change - them. -* OFMT:: Controlling Numeric Output With - `print'. -* Printf:: The `printf' statement. -* Basic Printf:: Syntax of the `printf' statement. -* Control Letters:: Format-control letters. -* Format Modifiers:: Format-specification modifiers. -* Printf Examples:: Several examples. -* Redirection:: How to redirect output to multiple - files and pipes. -* Special Files:: File name interpretation in - `gawk'. `gawk' allows - access to inherited file descriptors. -* Special FD:: Special files for I/O. -* Special Network:: Special files for network - communications. -* Special Caveats:: Things to watch out for. -* Close Files And Pipes:: Closing Input and Output Files and - Pipes. -* Values:: Constants, Variables, and Regular - Expressions. -* Constants:: String, numeric and regexp constants. -* Scalar Constants:: Numeric and string constants. -* Nondecimal-numbers:: What are octal and hex numbers. -* Regexp Constants:: Regular Expression constants. -* Using Constant Regexps:: When and how to use a regexp constant. -* Variables:: Variables give names to values for - later use. -* Using Variables:: Using variables in your programs. -* Assignment Options:: Setting variables on the command-line - and a summary of command-line syntax. - This is an advanced method of input. -* Conversion:: The conversion of strings to numbers - and vice versa. -* All Operators:: `gawk''s operators. -* Arithmetic Ops:: Arithmetic operations (`+', - `-', etc.) -* Concatenation:: Concatenating strings. -* Assignment Ops:: Changing the value of a variable or a - field. -* Increment Ops:: Incrementing the numeric value of a - variable. -* Truth Values and Conditions:: Testing for true and false. -* Truth Values:: What is ``true'' and what is ``false''. -* Typing and Comparison:: How variables acquire types and how - this affects comparison of numbers and - strings with `<', etc. -* Variable Typing:: String type versus numeric type. -* Comparison Operators:: The comparison operators. -* POSIX String Comparison:: String comparison with POSIX rules. -* Boolean Ops:: Combining comparison expressions using - boolean operators `||' (``or''), - `&&' (``and'') and `!' - (``not''). -* Conditional Exp:: Conditional expressions select between - two subexpressions under control of a - third subexpression. -* Function Calls:: A function call is an expression. -* Precedence:: How various operators nest. -* Locales:: How the locale affects things. -* Pattern Overview:: What goes into a pattern. -* Regexp Patterns:: Using regexps as patterns. -* Expression Patterns:: Any expression can be used as a - pattern. -* Ranges:: Pairs of patterns specify record - ranges. -* BEGIN/END:: Specifying initialization and cleanup - rules. -* Using BEGIN/END:: How and why to use BEGIN/END rules. -* I/O And BEGIN/END:: I/O issues in BEGIN/END rules. -* BEGINFILE/ENDFILE:: Two special patterns for advanced - control. -* Empty:: The empty pattern, which matches every - record. -* Using Shell Variables:: How to use shell variables with - `awk'. -* Action Overview:: What goes into an action. -* Statements:: Describes the various control - statements in detail. -* If Statement:: Conditionally execute some - `awk' statements. -* While Statement:: Loop until some condition is satisfied. -* Do Statement:: Do specified action while looping until - some condition is satisfied. -* For Statement:: Another looping statement, that - provides initialization and increment - clauses. -* Switch Statement:: Switch/case evaluation for conditional - execution of statements based on a - value. -* Break Statement:: Immediately exit the innermost - enclosing loop. -* Continue Statement:: Skip to the end of the innermost - enclosing loop. -* Next Statement:: Stop processing the current input - record. -* Nextfile Statement:: Stop processing the current file. -* Exit Statement:: Stop execution of `awk'. -* Built-in Variables:: Summarizes the built-in variables. -* User-modified:: Built-in variables that you change to - control `awk'. -* Auto-set:: Built-in variables where `awk' - gives you information. -* ARGC and ARGV:: Ways to use `ARGC' and - `ARGV'. -* Array Basics:: The basics of arrays. -* Array Intro:: Introduction to Arrays -* Reference to Elements:: How to examine one element of an array. -* Assigning Elements:: How to change an element of an array. -* Array Example:: Basic Example of an Array -* Scanning an Array:: A variation of the `for' - statement. It loops through the indices - of an array's existing elements. -* Delete:: The `delete' statement removes an - element from an array. -* Numeric Array Subscripts:: How to use numbers as subscripts in - `awk'. -* Uninitialized Subscripts:: Using Uninitialized variables as - subscripts. -* Multi-dimensional:: Emulating multidimensional arrays in - `awk'. -* Multi-scanning:: Scanning multidimensional arrays. -* Arrays of Arrays:: True multidimensional arrays. -* Built-in:: Summarizes the built-in functions. -* Calling Built-in:: How to call built-in functions. -* Numeric Functions:: Functions that work with numbers, - including `int()', `sin()' - and `rand()'. -* String Functions:: Functions for string manipulation, such - as `split()', `match()' and - `sprintf()'. -* Gory Details:: More than you want to know about - `\' and `&' with - `sub()', `gsub()', and - `gensub()'. -* I/O Functions:: Functions for files and shell commands. -* Time Functions:: Functions for dealing with timestamps. -* Bitwise Functions:: Functions for bitwise operations. -* Type Functions:: Functions for type information. -* I18N Functions:: Functions for string translation. -* User-defined:: Describes User-defined functions in - detail. -* Definition Syntax:: How to write definitions and what they - mean. -* Function Example:: An example function definition and what - it does. -* Function Caveats:: Things to watch out for. -* Calling A Function:: Don't use spaces. -* Variable Scope:: Controlling variable scope. -* Pass By Value/Reference:: Passing parameters. -* Return Statement:: Specifying the value a function - returns. -* Dynamic Typing:: How variable types can change at - runtime. -* Indirect Calls:: Choosing the function to call at - runtime. -* I18N and L10N:: Internationalization and Localization. -* Explaining gettext:: How GNU `gettext' works. -* Programmer i18n:: Features for the programmer. -* Translator i18n:: Features for the translator. -* String Extraction:: Extracting marked strings. -* Printf Ordering:: Rearranging `printf' arguments. -* I18N Portability:: `awk'-level portability issues. -* I18N Example:: A simple i18n example. -* Gawk I18N:: `gawk' is also - internationalized. -* Nondecimal Data:: Allowing nondecimal input data. -* Array Sorting:: Facilities for controlling array - traversal and sorting arrays. -* Controlling Array Traversal:: How to use PROCINFO["sorted_in"]. -* Controlling Scanning With A Function:: Using a function to control scanning. -* Controlling Scanning:: Controlling the order in which arrays - are scanned. -* Array Sorting Functions:: How to use `asort()' and - `asorti()'. -* Two-way I/O:: Two-way communications with another - process. -* TCP/IP Networking:: Using `gawk' for network - programming. -* Profiling:: Profiling your `awk' programs. -* Library Names:: How to best name private global - variables in library functions. -* General Functions:: Functions that are of general use. -* Strtonum Function:: A replacement for the built-in - `strtonum()' function. -* Assert Function:: A function for assertions in - `awk' programs. -* Round Function:: A function for rounding if - `sprintf()' does not do it - correctly. -* Cliff Random Function:: The Cliff Random Number Generator. -* Ordinal Functions:: Functions for using characters as - numbers and vice versa. -* Join Function:: A function to join an array into a - string. -* Gettimeofday Function:: A function to get formatted times. -* Data File Management:: Functions for managing command-line - data files. -* Filetrans Function:: A function for handling data file - transitions. -* Rewind Function:: A function for rereading the current - file. -* File Checking:: Checking that data files are readable. -* Empty Files:: Checking for zero-length files. -* Ignoring Assigns:: Treating assignments as file names. -* Getopt Function:: A function for processing command-line - arguments. -* Passwd Functions:: Functions for getting user information. -* Group Functions:: Functions for getting group - information. -* Walking Arrays:: A function to walk arrays of arrays. -* Running Examples:: How to run these examples. -* Clones:: Clones of common utilities. -* Cut Program:: The `cut' utility. -* Egrep Program:: The `egrep' utility. -* Id Program:: The `id' utility. -* Split Program:: The `split' utility. -* Tee Program:: The `tee' utility. -* Uniq Program:: The `uniq' utility. -* Wc Program:: The `wc' utility. -* Miscellaneous Programs:: Some interesting `awk' - programs. -* Dupword Program:: Finding duplicated words in a document. -* Alarm Program:: An alarm clock. -* Translate Program:: A program similar to the `tr' - utility. -* Labels Program:: Printing mailing labels. -* Word Sorting:: A program to produce a word usage - count. -* History Sorting:: Eliminating duplicate entries from a - history file. -* Extract Program:: Pulling out programs from Texinfo - source files. -* Simple Sed:: A Simple Stream Editor. -* Igawk Program:: A wrapper for `awk' that - includes files. -* Anagram Program:: Finding anagrams from a dictionary. -* Signature Program:: People do amazing things with too much - time on their hands. -* Debugging:: Introduction to `dgawk'. -* Debugging Concepts:: Debugging In General. -* Debugging Terms:: Additional Debugging Concepts. -* Awk Debugging:: Awk Debugging. -* Sample dgawk session:: Sample `dgawk' session. -* dgawk invocation:: `dgawk' Invocation. -* Finding The Bug:: Finding The Bug. -* List of Debugger Commands:: Main `dgawk' Commands. -* Breakpoint Control:: Control of breakpoints. -* Dgawk Execution Control:: Control of execution. -* Viewing And Changing Data:: Viewing and changing data. -* Dgawk Stack:: Dealing with the stack. -* Dgawk Info:: Obtaining information about the program - and the debugger state. -* Miscellaneous Dgawk Commands:: Miscellaneous Commands. -* Readline Support:: Readline Support. -* Dgawk Limitations:: Limitations and future plans. -* V7/SVR3.1:: The major changes between V7 and System - V Release 3.1. -* SVR4:: Minor changes between System V Releases - 3.1 and 4. -* POSIX:: New features from the POSIX standard. -* BTL:: New features from Brian Kernighan's - version of `awk'. -* POSIX/GNU:: The extensions in `gawk' not in - POSIX `awk'. -* Common Extensions:: Common Extensions Summary. -* Ranges and Locales:: How locales used to affect regexp - ranges. -* Contributors:: The major contributors to - `gawk'. -* Gawk Distribution:: What is in the `gawk' - distribution. -* Getting:: How to get the distribution. -* Extracting:: How to extract the distribution. -* Distribution contents:: What is in the distribution. -* Unix Installation:: Installing `gawk' under various - versions of Unix. -* Quick Installation:: Compiling `gawk' under Unix. -* Additional Configuration Options:: Other compile-time options. -* Configuration Philosophy:: How it's all supposed to work. -* Non-Unix Installation:: Installation on Other Operating - Systems. -* PC Installation:: Installing and Compiling `gawk' - on MS-DOS and OS/2. -* PC Binary Installation:: Installing a prepared distribution. -* PC Compiling:: Compiling `gawk' for MS-DOS, - Windows32, and OS/2. -* PC Testing:: Testing `gawk' on PC systems. -* PC Using:: Running `gawk' on MS-DOS, - Windows32 and OS/2. -* Cygwin:: Building and running `gawk' for - Cygwin. -* MSYS:: Using `gawk' In The MSYS - Environment. -* VMS Installation:: Installing `gawk' on VMS. -* VMS Compilation:: How to compile `gawk' under - VMS. -* VMS Installation Details:: How to install `gawk' under - VMS. -* VMS Running:: How to run `gawk' under VMS. -* VMS Old Gawk:: An old version comes with some VMS - systems. -* Bugs:: Reporting Problems and Bugs. -* Other Versions:: Other freely available `awk' - implementations. -* Compatibility Mode:: How to disable certain `gawk' - extensions. -* Additions:: Making Additions To `gawk'. -* Accessing The Source:: Accessing the Git repository. -* Adding Code:: Adding code to the main body of - `gawk'. -* New Ports:: Porting `gawk' to a new - operating system. -* Dynamic Extensions:: Adding new built-in functions to - `gawk'. -* Internals:: A brief look at some `gawk' - internals. -* Plugin License:: A note about licensing. -* Sample Library:: A example of new functions. -* Internal File Description:: What the new functions will do. -* Internal File Ops:: The code for internal file operations. -* Using Internal File Ops:: How to use an external extension. -* Future Extensions:: New features that may be implemented - one day. -* Basic High Level:: The high level view. -* Basic Data Typing:: A very quick intro to data types. -* Floating Point Issues:: Stuff to know about floating-point - numbers. -* String Conversion Precision:: The String Value Can Lie. -* Unexpected Results:: Floating Point Numbers Are Not Abstract - Numbers. -* POSIX Floating Point Problems:: Standards Versus Existing Practice. +* History:: The history of `gawk' and + `awk'. +* Names:: What name to use to find `awk'. +* This Manual:: Using this Info file. Includes + sample input files that you can use. +* Conventions:: Typographical Conventions. +* Manual History:: Brief history of the GNU project and this + Info file. +* How To Contribute:: Helping to save the world. +* Acknowledgments:: Acknowledgments. +* Running gawk:: How to run `gawk' programs; + includes command-line syntax. +* One-shot:: Running a short throwaway `awk' + program. +* Read Terminal:: Using no input files (input from terminal + instead). +* Long:: Putting permanent `awk' programs in + files. +* Executable Scripts:: Making self-contained `awk' + programs. +* Comments:: Adding documentation to `gawk' + programs. +* Quoting:: More discussion of shell quoting issues. +* DOS Quoting:: Quoting in Windows Batch Files. +* Sample Data Files:: Sample data files for use in the + `awk' programs illustrated in this + Info file. +* Very Simple:: A very simple example. +* Two Rules:: A less simple one-line example using two + rules. +* More Complex:: A more complex example. +* Statements/Lines:: Subdividing or combining statements into + lines. +* Other Features:: Other Features of `awk'. +* When:: When to use `gawk' and when to use + other things. +* Command Line:: How to run `awk'. +* Options:: Command-line options and their meanings. +* Other Arguments:: Input file names and variable assignments. +* Naming Standard Input:: How to specify standard input with other + files. +* Environment Variables:: The environment variables `gawk' + uses. +* AWKPATH Variable:: Searching directories for `awk' + programs. +* Other Environment Variables:: The environment variables. +* Exit Status:: `gawk''s exit status. +* Include Files:: Including other files into your program. +* Obsolete:: Obsolete Options and/or features. +* Undocumented:: Undocumented Options and Features. +* Regexp Usage:: How to Use Regular Expressions. +* Escape Sequences:: How to write nonprinting characters. +* Regexp Operators:: Regular Expression Operators. +* Bracket Expressions:: What can go between `[...]'. +* GNU Regexp Operators:: Operators specific to GNU software. +* Case-sensitivity:: How to do case-insensitive matching. +* Leftmost Longest:: How much text matches. +* Computed Regexps:: Using Dynamic Regexps. +* Records:: Controlling how data is split into records. +* Fields:: An introduction to fields. +* Nonconstant Fields:: Nonconstant Field Numbers. +* Changing Fields:: Changing the Contents of a Field. +* Field Separators:: The field separator and how to change it. +* Default Field Splitting:: How fields are normally separated. +* Regexp Field Splitting:: Using regexps as the field separator. +* Single Character Fields:: Making each character a separate field. +* Command Line Field Separator:: Setting `FS' from the command-line. +* Field Splitting Summary:: Some final points and a summary table. +* Constant Size:: Reading constant width data. +* Splitting By Content:: Defining Fields By Content +* Multiple Line:: Reading multi-line records. +* Getline:: Reading files under explicit program + control using the `getline' function. +* Plain Getline:: Using `getline' with no arguments. +* Getline/Variable:: Using `getline' into a variable. +* Getline/File:: Using `getline' from a file. +* Getline/Variable/File:: Using `getline' into a variable from a + file. +* Getline/Pipe:: Using `getline' from a pipe. +* Getline/Variable/Pipe:: Using `getline' into a variable from a + pipe. +* Getline/Coprocess:: Using `getline' from a coprocess. +* Getline/Variable/Coprocess:: Using `getline' into a variable from a + coprocess. +* Getline Notes:: Important things to know about + `getline'. +* Getline Summary:: Summary of `getline' Variants. +* Command line directories:: What happens if you put a directory on the + command line. +* Print:: The `print' statement. +* Print Examples:: Simple examples of `print' statements. +* Output Separators:: The output separators and how to change + them. +* OFMT:: Controlling Numeric Output With + `print'. +* Printf:: The `printf' statement. +* Basic Printf:: Syntax of the `printf' statement. +* Control Letters:: Format-control letters. +* Format Modifiers:: Format-specification modifiers. +* Printf Examples:: Several examples. +* Redirection:: How to redirect output to multiple files + and pipes. +* Special Files:: File name interpretation in `gawk'. + `gawk' allows access to inherited + file descriptors. +* Special FD:: Special files for I/O. +* Special Network:: Special files for network communications. +* Special Caveats:: Things to watch out for. +* Close Files And Pipes:: Closing Input and Output Files and Pipes. +* Values:: Constants, Variables, and Regular + Expressions. +* Constants:: String, numeric and regexp constants. +* Scalar Constants:: Numeric and string constants. +* Nondecimal-numbers:: What are octal and hex numbers. +* Regexp Constants:: Regular Expression constants. +* Using Constant Regexps:: When and how to use a regexp constant. +* Variables:: Variables give names to values for later + use. +* Using Variables:: Using variables in your programs. +* Assignment Options:: Setting variables on the command-line and a + summary of command-line syntax. This is an + advanced method of input. +* Conversion:: The conversion of strings to numbers and + vice versa. +* All Operators:: `gawk''s operators. +* Arithmetic Ops:: Arithmetic operations (`+', `-', + etc.) +* Concatenation:: Concatenating strings. +* Assignment Ops:: Changing the value of a variable or a + field. +* Increment Ops:: Incrementing the numeric value of a + variable. +* Truth Values and Conditions:: Testing for true and false. +* Truth Values:: What is ``true'' and what is ``false''. +* Typing and Comparison:: How variables acquire types and how this + affects comparison of numbers and strings + with `<', etc. +* Variable Typing:: String type versus numeric type. +* Comparison Operators:: The comparison operators. +* POSIX String Comparison:: String comparison with POSIX rules. +* Boolean Ops:: Combining comparison expressions using + boolean operators `||' (``or''), + `&&' (``and'') and `!' (``not''). +* Conditional Exp:: Conditional expressions select between two + subexpressions under control of a third + subexpression. +* Function Calls:: A function call is an expression. +* Precedence:: How various operators nest. +* Locales:: How the locale affects things. +* Pattern Overview:: What goes into a pattern. +* Regexp Patterns:: Using regexps as patterns. +* Expression Patterns:: Any expression can be used as a pattern. +* Ranges:: Pairs of patterns specify record ranges. +* BEGIN/END:: Specifying initialization and cleanup + rules. +* Using BEGIN/END:: How and why to use BEGIN/END rules. +* I/O And BEGIN/END:: I/O issues in BEGIN/END rules. +* BEGINFILE/ENDFILE:: Two special patterns for advanced control. +* Empty:: The empty pattern, which matches every + record. +* Using Shell Variables:: How to use shell variables with + `awk'. +* Action Overview:: What goes into an action. +* Statements:: Describes the various control statements in + detail. +* If Statement:: Conditionally execute some `awk' + statements. +* While Statement:: Loop until some condition is satisfied. +* Do Statement:: Do specified action while looping until + some condition is satisfied. +* For Statement:: Another looping statement, that provides + initialization and increment clauses. +* Switch Statement:: Switch/case evaluation for conditional + execution of statements based on a value. +* Break Statement:: Immediately exit the innermost enclosing + loop. +* Continue Statement:: Skip to the end of the innermost enclosing + loop. +* Next Statement:: Stop processing the current input record. +* Nextfile Statement:: Stop processing the current file. +* Exit Statement:: Stop execution of `awk'. +* Built-in Variables:: Summarizes the built-in variables. +* User-modified:: Built-in variables that you change to + control `awk'. +* Auto-set:: Built-in variables where `awk' + gives you information. +* ARGC and ARGV:: Ways to use `ARGC' and `ARGV'. +* Array Basics:: The basics of arrays. +* Array Intro:: Introduction to Arrays +* Reference to Elements:: How to examine one element of an array. +* Assigning Elements:: How to change an element of an array. +* Array Example:: Basic Example of an Array +* Scanning an Array:: A variation of the `for' statement. It + loops through the indices of an array's + existing elements. +* Controlling Scanning:: Controlling the order in which arrays are + scanned. +* Delete:: The `delete' statement removes an + element from an array. +* Numeric Array Subscripts:: How to use numbers as subscripts in + `awk'. +* Uninitialized Subscripts:: Using Uninitialized variables as + subscripts. +* Multi-dimensional:: Emulating multidimensional arrays in + `awk'. +* Multi-scanning:: Scanning multidimensional arrays. +* Arrays of Arrays:: True multidimensional arrays. +* Built-in:: Summarizes the built-in functions. +* Calling Built-in:: How to call built-in functions. +* Numeric Functions:: Functions that work with numbers, including + `int()', `sin()' and + `rand()'. +* String Functions:: Functions for string manipulation, such as + `split()', `match()' and + `sprintf()'. +* Gory Details:: More than you want to know about `\' + and `&' with `sub()', + `gsub()', and `gensub()'. +* I/O Functions:: Functions for files and shell commands. +* Time Functions:: Functions for dealing with timestamps. +* Bitwise Functions:: Functions for bitwise operations. +* Type Functions:: Functions for type information. +* I18N Functions:: Functions for string translation. +* User-defined:: Describes User-defined functions in detail. +* Definition Syntax:: How to write definitions and what they + mean. +* Function Example:: An example function definition and what it + does. +* Function Caveats:: Things to watch out for. +* Calling A Function:: Don't use spaces. +* Variable Scope:: Controlling variable scope. +* Pass By Value/Reference:: Passing parameters. +* Return Statement:: Specifying the value a function returns. +* Dynamic Typing:: How variable types can change at runtime. +* Indirect Calls:: Choosing the function to call at runtime. +* I18N and L10N:: Internationalization and Localization. +* Explaining gettext:: How GNU `gettext' works. +* Programmer i18n:: Features for the programmer. +* Translator i18n:: Features for the translator. +* String Extraction:: Extracting marked strings. +* Printf Ordering:: Rearranging `printf' arguments. +* I18N Portability:: `awk'-level portability issues. +* I18N Example:: A simple i18n example. +* Gawk I18N:: `gawk' is also internationalized. +* Nondecimal Data:: Allowing nondecimal input data. +* Array Sorting:: Facilities for controlling array traversal + and sorting arrays. +* Controlling Array Traversal:: How to use PROCINFO["sorted_in"]. +* Array Sorting Functions:: How to use `asort()' and + `asorti()'. +* Two-way I/O:: Two-way communications with another + process. +* TCP/IP Networking:: Using `gawk' for network + programming. +* Profiling:: Profiling your `awk' programs. +* Library Names:: How to best name private global variables + in library functions. +* General Functions:: Functions that are of general use. +* Strtonum Function:: A replacement for the built-in + `strtonum()' function. +* Assert Function:: A function for assertions in `awk' + programs. +* Round Function:: A function for rounding if `sprintf()' + does not do it correctly. +* Cliff Random Function:: The Cliff Random Number Generator. +* Ordinal Functions:: Functions for using characters as numbers + and vice versa. +* Join Function:: A function to join an array into a string. +* Gettimeofday Function:: A function to get formatted times. +* Data File Management:: Functions for managing command-line data + files. +* Filetrans Function:: A function for handling data file + transitions. +* Rewind Function:: A function for rereading the current file. +* File Checking:: Checking that data files are readable. +* Empty Files:: Checking for zero-length files. +* Ignoring Assigns:: Treating assignments as file names. +* Getopt Function:: A function for processing command-line + arguments. +* Passwd Functions:: Functions for getting user information. +* Group Functions:: Functions for getting group information. +* Walking Arrays:: A function to walk arrays of arrays. +* Running Examples:: How to run these examples. +* Clones:: Clones of common utilities. +* Cut Program:: The `cut' utility. +* Egrep Program:: The `egrep' utility. +* Id Program:: The `id' utility. +* Split Program:: The `split' utility. +* Tee Program:: The `tee' utility. +* Uniq Program:: The `uniq' utility. +* Wc Program:: The `wc' utility. +* Miscellaneous Programs:: Some interesting `awk' programs. +* Dupword Program:: Finding duplicated words in a document. +* Alarm Program:: An alarm clock. +* Translate Program:: A program similar to the `tr' + utility. +* Labels Program:: Printing mailing labels. +* Word Sorting:: A program to produce a word usage count. +* History Sorting:: Eliminating duplicate entries from a + history file. +* Extract Program:: Pulling out programs from Texinfo source + files. +* Simple Sed:: A Simple Stream Editor. +* Igawk Program:: A wrapper for `awk' that includes + files. +* Anagram Program:: Finding anagrams from a dictionary. +* Signature Program:: People do amazing things with too much time + on their hands. +* Debugging:: Introduction to `dgawk'. +* Debugging Concepts:: Debugging In General. +* Debugging Terms:: Additional Debugging Concepts. +* Awk Debugging:: Awk Debugging. +* Sample dgawk session:: Sample `dgawk' session. +* dgawk invocation:: `dgawk' Invocation. +* Finding The Bug:: Finding The Bug. +* List of Debugger Commands:: Main `dgawk' Commands. +* Breakpoint Control:: Control of breakpoints. +* Dgawk Execution Control:: Control of execution. +* Viewing And Changing Data:: Viewing and changing data. +* Dgawk Stack:: Dealing with the stack. +* Dgawk Info:: Obtaining information about the program and + the debugger state. +* Miscellaneous Dgawk Commands:: Miscellaneous Commands. +* Readline Support:: Readline Support. +* Dgawk Limitations:: Limitations and future plans. +* V7/SVR3.1:: The major changes between V7 and System V + Release 3.1. +* SVR4:: Minor changes between System V Releases 3.1 + and 4. +* POSIX:: New features from the POSIX standard. +* BTL:: New features from Brian Kernighan's version + of `awk'. +* POSIX/GNU:: The extensions in `gawk' not in + POSIX `awk'. +* Common Extensions:: Common Extensions Summary. +* Ranges and Locales:: How locales used to affect regexp ranges. +* Contributors:: The major contributors to `gawk'. +* Gawk Distribution:: What is in the `gawk' distribution. +* Getting:: How to get the distribution. +* Extracting:: How to extract the distribution. +* Distribution contents:: What is in the distribution. +* Unix Installation:: Installing `gawk' under various + versions of Unix. +* Quick Installation:: Compiling `gawk' under Unix. +* Additional Configuration Options:: Other compile-time options. +* Configuration Philosophy:: How it's all supposed to work. +* Non-Unix Installation:: Installation on Other Operating Systems. +* PC Installation:: Installing and Compiling `gawk' on + MS-DOS and OS/2. +* PC Binary Installation:: Installing a prepared distribution. +* PC Compiling:: Compiling `gawk' for MS-DOS, + Windows32, and OS/2. +* PC Testing:: Testing `gawk' on PC systems. +* PC Using:: Running `gawk' on MS-DOS, Windows32 + and OS/2. +* Cygwin:: Building and running `gawk' for + Cygwin. +* MSYS:: Using `gawk' In The MSYS + Environment. +* VMS Installation:: Installing `gawk' on VMS. +* VMS Compilation:: How to compile `gawk' under VMS. +* VMS Installation Details:: How to install `gawk' under VMS. +* VMS Running:: How to run `gawk' under VMS. +* VMS Old Gawk:: An old version comes with some VMS systems. +* Bugs:: Reporting Problems and Bugs. +* Other Versions:: Other freely available `awk' + implementations. +* Compatibility Mode:: How to disable certain `gawk' + extensions. +* Additions:: Making Additions To `gawk'. +* Accessing The Source:: Accessing the Git repository. +* Adding Code:: Adding code to the main body of + `gawk'. +* New Ports:: Porting `gawk' to a new operating + system. +* Dynamic Extensions:: Adding new built-in functions to + `gawk'. +* Internals:: A brief look at some `gawk' + internals. +* Plugin License:: A note about licensing. +* Sample Library:: A example of new functions. +* Internal File Description:: What the new functions will do. +* Internal File Ops:: The code for internal file operations. +* Using Internal File Ops:: How to use an external extension. +* Future Extensions:: New features that may be implemented one + day. +* Basic High Level:: The high level view. +* Basic Data Typing:: A very quick intro to data types. +* Floating Point Issues:: Stuff to know about floating-point numbers. +* String Conversion Precision:: The String Value Can Lie. +* Unexpected Results:: Floating Point Numbers Are Not Abstract + Numbers. +* POSIX Floating Point Problems:: Standards Versus Existing Practice. To Miriam, for making me complete. @@ -9641,6 +9601,8 @@ one at a time, and traversing all of the elements in an array. * Scanning an Array:: A variation of the `for' statement. It loops through the indices of an array's existing elements. +* Controlling Scanning:: Controlling the order in which arrays are + scanned.  File: gawk.info, Node: Array Intro, Next: Reference to Elements, Up: Array Basics @@ -9873,7 +9835,7 @@ easy improvement to the program's `END' rule, as follows: }  -File: gawk.info, Node: Scanning an Array, Prev: Array Example, Up: Array Basics +File: gawk.info, Node: Scanning an Array, Next: Controlling Scanning, Prev: Array Example, Up: Array Basics 8.1.5 Scanning All Elements of an Array --------------------------------------- @@ -9928,15 +9890,148 @@ statements in the loop body; it is not predictable whether the `for' loop will reach them. Similarly, changing VAR inside the loop may produce strange results. It is best to avoid such things. - As an extension, `gawk' makes it possible for you to loop over the -elements of an array in order, based on the value of -`PROCINFO["sorted_in"]' (*note Auto-set::). This is an advanced -feature, so discussion of it is delayed until *note Controlling Array -Traversal::. + +File: gawk.info, Node: Controlling Scanning, Prev: Scanning an Array, Up: Array Basics + +8.1.6 Using Predefined Array Scanning Orders +-------------------------------------------- + +By default, when a `for' loop traverses an array, the order is +undefined, meaning that the `awk' implementation determines the order +in which the array is traversed. This order is usually based on the +internal implementation of arrays and will vary from one version of +`awk' to the next. + + Often, though, you may wish to do something simple, such as +"traverse the array by comparing the indices in ascending order," or +"traverse the array by on comparing the values in descending order." +`gawk' provides two mechanims which give you this control. + + * Set `PROCINFO["sorted_in"]' to one of a set of predefined values. + We describe this now. + + * Set `PROCINFO["sorted_in"]' to the name of a user-defined function + to be used for comparison of array elements. This advanced feature + is described later, in *note Array Sorting::. + + The following special values for `PROCINFO["sorted_in"]' are +available: + +`"@unsorted"' + Array elements are processed in arbitrary order, which is the + default `awk' behavior. + +`"@ind_str_asc"' + Order by indices compared as strings; this is the most basic sort. + (Internally, array indices are always strings, so with `a[2*5] = 1' + the index is `"10"' rather than numeric 10.) + +`"@ind_num_asc"' + Order by indices but force them to be treated as numbers in the + process. Any index with a non-numeric value will end up + positioned as if it were zero. + +`"@val_type_asc"' + Order by element values rather than indices. Ordering is by the + type assigned to the element (*note Typing and Comparison::). All + numeric values come before all string values, which in turn come + before all subarrays. (Subarrays have not been described yet; + *note Arrays of Arrays::). + +`"@val_str_asc"' + Order by element values rather than by indices. Scalar values are + compared as strings. Subarrays, if present, come out last. + +`"@val_num_asc"' + Order by element values rather than by indices. Scalar values are + compared as numbers. Subarrays, if present, come out last. When + numeric values are equal, the string values are used to provide an + ordering: this guarantees consistent results across different + versions of the C `qsort()' function,(1) which `gawk' uses + internally to perform the sorting. + +`"@ind_str_desc"' + Reverse order from the most basic sort. + +`"@ind_num_desc"' + Numeric indices ordered from high to low. + +`"@val_type_desc"' + Element values, based on type, in descending order. + +`"@val_str_desc"' + Element values, treated as strings, ordered from high to low. + Subarrays, if present, come out first. + +`"@val_num_desc"' + Element values, treated as numbers, ordered from high to low. + Subarrays, if present, come out first. + + The array traversal order is determined before the `for' loop starts +to run. Changing `PROCINFO["sorted_in"]' in the loop body will not +affect the loop. + + For example: + + $ gawk 'BEGIN { + > a[4] = 4 + > a[3] = 3 + > for (i in a) + > print i, a[i] + > }' + -| 4 4 + -| 3 3 + $ gawk 'BEGIN { + > PROCINFO["sorted_in"] = "@ind_str_asc" + > a[4] = 4 + > a[3] = 3 + > for (i in a) + > print i, a[i] + > }' + -| 3 3 + -| 4 4 + + When sorting an array by element values, if a value happens to be a +subarray then it is considered to be greater than any string or numeric +value, regardless of what the subarray itself contains, and all +subarrays are treated as being equal to each other. Their order +relative to each other is determined by their index strings. + + Here are some additional things to bear in mind about sorted array +traversal. + + * The value of `PROCINFO["sorted_in"]' is global. That is, it affects + all array traversal `for' loops. If you need to change it within + your own code, you should see if it's defined and save and restore + the value: + + ... + if ("sorted_in" in PROCINFO) { + save_sorted = PROCINFO["sorted_in"] + PROCINFO["sorted_in"] = "@val_str_desc" # or whatever + } + ... + if (save_sorted) + PROCINFO["sorted_in"] = save_sorted + + * As mentioned, the default array traversal order is represented by + `"@unsorted"'. You can also get the default behavior by assigning + the null string to `PROCINFO["sorted_in"]' or by just deleting the + `"sorted_in"' element from the `PROCINFO' array with the `delete' + statement. (The `delete' statement hasn't been described yet; + *note Delete::.) In addition, `gawk' provides built-in functions for sorting arrays; see *note Array Sorting Functions::. + ---------- Footnotes ---------- + + (1) When two elements compare as equal, the C `qsort()' function +does not guarantee that they will maintain their original relative +order after sorting. Using the string value to provide a unique +ordering when the numeric values are equal ensures that `gawk' behaves +consistently across different environments. +  File: gawk.info, Node: Delete, Next: Numeric Array Subscripts, Prev: Array Basics, Up: Arrays @@ -13462,8 +13557,8 @@ File: gawk.info, Node: Array Sorting, Next: Two-way I/O, Prev: Nondecimal Dat 11.2 Controlling Array Traversal and Array Sorting ================================================== -`gawk' lets you control the order in which `for (i in array)' loops -will traverse an array. +`gawk' lets you control the order in which a `for (i in array)' loop +traverses an array. In addition, two built-in functions, `asort()' and `asorti()', let you sort arrays based on the array values and indices, respectively. @@ -13487,24 +13582,17 @@ of arrays inside `awk'. Often, though, it is desirable to be able to loop over the elements in a particular order that you, the programmer, choose. `gawk' lets -you do this; this node describes how. - -* Menu: - -* Controlling Scanning With A Function:: Using a function to control scanning. -* Controlling Scanning:: Controlling the order in which arrays - are scanned. - - -File: gawk.info, Node: Controlling Scanning With A Function, Next: Controlling Scanning, Up: Controlling Array Traversal +you do this. -11.2.1.1 Array Scanning Using A User-defined Function -..................................................... + *note Controlling Scanning::, describes how you can assign special, +pre-defined values to `PROCINFO["sorted_in"]' in order to control the +order in which `gawk' will traverse an array during a `for' loop. -The value of `PROCINFO["sorted_in"]' can be a function name. This lets -you traverse an array based on any custom criterion. The array -elements are ordered according to the return value of this function. -The comparison function should be defined with at least four arguments: + In addition, the value of `PROCINFO["sorted_in"]' can be a function +name. This lets you traverse an array based on any custom criterion. +The array elements are ordered according to the return value of this +function. The comparison function should be defined with at least four +arguments: function comp_func(i1, v1, i2, v2) { @@ -13514,8 +13602,9 @@ The comparison function should be defined with at least four arguments: Here, I1 and I2 are the indices, and V1 and V2 are the corresponding values of the two elements being compared. Either V1 or V2, or both, -can be arrays if the array being traversed contains subarrays as -values. The three possible return values are interpreted this way: +can be arrays if the array being traversed contains subarrays as values. +(*Note Arrays of Arrays::, for more information about subarrays.) The +three possible return values are interpreted as follows: `comp_func(i1, v1, i2, v2) < 0' Index I1 comes before index I2 during loop traversal. @@ -13642,9 +13731,8 @@ specific field position and can be used for this purpose: The first field in each entry of the password file is the user's login name, and the fields are seperated by colons. Each record -defines a subarray (*note Arrays of Arrays::), with each field as an -element in the subarray. Running the program produces the following -output: +defines a subarray, with each field as an element in the subarray. +Running the program produces the following output: $ gawk -vPOS=1 -F: -f sort.awk /etc/passwd -| adm:x:3:4:adm:/var/adm:/sbin/nologin @@ -13713,140 +13801,6 @@ array has been reported to add 15% to 20% overhead to the execution time of `awk' programs. For this reason, sorted array traversal is not the default. - -File: gawk.info, Node: Controlling Scanning, Prev: Controlling Scanning With A Function, Up: Controlling Array Traversal - -11.2.1.2 Controlling Array Scanning Order -......................................... - -As described in *note Controlling Scanning With A Function::, you can -provide the name of a function as the value of `PROCINFO["sorted_in"]' -to specify custom sorting criteria. - - Often, though, you may wish to do something simple, such as "sort -based on comparing the indices in ascending order," or "sort based on -comparing the values in descending order." Having to write a simple -comparison function for this purpose for use in all of your programs -becomes tedious. For the common simple cases, `gawk' provides the -option of using special names that do the requested sorting for you. -You can think of them as "predefined" sorting functions, if you like, -although the names purposely include characters that are not valid in -real `awk' function names. - - The following special values are available: - -`"@unsorted"' - Array elements are processed in arbitrary order, which is the - default `awk' behavior. - -`"@ind_str_asc"' - Order by indices compared as strings; this is the most basic sort. - (Internally, array indices are always strings, so with `a[2*5] = 1' - the index is `"10"' rather than numeric 10.) - -`"@ind_num_asc"' - Order by indices but force them to be treated as numbers in the - process. Any index with a non-numeric value will end up - positioned as if it were zero. - -`"@val_type_asc"' - Order by element values rather than indices. Ordering is by the - type assigned to the element (*note Typing and Comparison::). All - numeric values come before all string values, which in turn come - before all subarrays. - -`"@val_str_asc"' - Order by element values rather than by indices. Scalar values are - compared as strings. Subarrays, if present, come out last. - -`"@val_num_asc"' - Order by element values rather than by indices. Scalar values are - compared as numbers. Subarrays, if present, come out last. When - numeric values are equal, the string values are used to provide an - ordering: this guarantees consistent results across different - versions of the C `qsort()' function(1), which `gawk' uses - internally to perform the sorting. - -`"@ind_str_desc"' - Reverse order from the most basic sort. - -`"@ind_num_desc"' - Numeric indices ordered from high to low. - -`"@val_type_desc"' - Element values, based on type, in descending order. - -`"@val_str_desc"' - Element values, treated as strings, ordered from high to low. - Subarrays, if present, come out first. - -`"@val_num_desc"' - Element values, treated as numbers, ordered from high to low. - Subarrays, if present, come out first. - - The array traversal order is determined before the `for' loop starts -to run. Changing `PROCINFO["sorted_in"]' in the loop body will not -affect the loop. - - For example: - - $ gawk 'BEGIN { - > a[4] = 4 - > a[3] = 3 - > for (i in a) - > print i, a[i] - > }' - -| 4 4 - -| 3 3 - $ gawk 'BEGIN { - > PROCINFO["sorted_in"] = "@ind_str_asc" - > a[4] = 4 - > a[3] = 3 - > for (i in a) - > print i, a[i] - > }' - -| 3 3 - -| 4 4 - - When sorting an array by element values, if a value happens to be a -subarray then it is considered to be greater than any string or numeric -value, regardless of what the subarray itself contains, and all -subarrays are treated as being equal to each other. Their order -relative to each other is determined by their index strings. - - Here are some additional things to bear in mind about sorted array -traversal. - - * The value of `PROCINFO["sorted_in"]' is global. That is, it affects - all array traversal `for' loops. If you need to change it within - your own function, you should see if it's defined and save and - restore the value: - - function myfunct(p1, p2, save_sorted) - { - ... - if ("sorted_in" in PROCINFO) { - save_sorted = PROCINFO["sorted_in"] - PROCINFO["sorted_in"] = "@val_str_desc" # or whatever - } - ... - if (save_sorted) - PROCINFO["sorted_in"] = save_sorted - } - - * As mentioned, the default array traversal order is represented by - `"@unsorted"'. You can also get the default behavior by assigning - the null string to `PROCINFO["sorted_in"]' or by just deleting the - `"sorted_in"' element from the `PROCINFO' array. - - ---------- Footnotes ---------- - - (1) When two elements compare as equal, the C `qsort()' function -does not guarantee that they will maintain their original relative -order after sorting. Using the string value to provide a unique -ordering when the numeric values are equal ensures that `gawk' behaves -consistently across different environments. -  File: gawk.info, Node: Array Sorting Functions, Prev: Controlling Array Traversal, Up: Array Sorting @@ -13854,10 +13808,10 @@ File: gawk.info, Node: Array Sorting Functions, Prev: Controlling Array Traver --------------------------------------------------- In most `awk' implementations, sorting an array requires writing a -`sort' function. While this can be educational for exploring different -sorting algorithms, usually that's not the point of the program. -`gawk' provides the built-in `asort()' and `asorti()' functions (*note -String Functions::) for sorting arrays. For example: +`sort()' function. While this can be educational for exploring +different sorting algorithms, usually that's not the point of the +program. `gawk' provides the built-in `asort()' and `asorti()' +functions (*note String Functions::) for sorting arrays. For example: POPULATE THE ARRAY data n = asort(data) @@ -13886,8 +13840,9 @@ array is not affected. `asort()' accepts a third string argument to control comparison of array elements. As with `PROCINFO["sorted_in"]', this argument may be -the name of a user-defined function, or one of the predefined names -that `gawk' provides (*note Controlling Scanning With A Function::). +one of the predefined names that `gawk' provides (*note Controlling +Scanning::), or the name of a user-defined function (*note Controlling +Array Traversal::). NOTE: In all cases, the sorted element values consist of the original array's element values. The ability to control @@ -20418,7 +20373,7 @@ There are three ways to get GNU software: supported. If you have the `wget' program, you can use a command like the following: - wget http://ftp.gnu.org/gnu/gawk/gawk-4.0.0.tar.gz + wget http://ftp.gnu.org/gnu/gawk/gawk-4.0.1.tar.gz The GNU software archive is mirrored around the world. The up-to-date list of mirror sites is available from the main FSF web site @@ -20437,26 +20392,26 @@ compression programs: `gzip', `bzip2', and `xz'. For simplicity, the rest of these instructions assume you are using the one compressed with the GNU Zip program, `gzip'. - Once you have the distribution (for example, `gawk-4.0.0.tar.gz'), + Once you have the distribution (for example, `gawk-4.0.1.tar.gz'), use `gzip' to expand the file and then use `tar' to extract it. You can use the following pipeline to produce the `gawk' distribution: # Under System V, add 'o' to the tar options - gzip -d -c gawk-4.0.0.tar.gz | tar -xvpf - + gzip -d -c gawk-4.0.1.tar.gz | tar -xvpf - On a system with GNU `tar', you can let `tar' do the decompression for you: - tar -xvpzf gawk-4.0.0.tar.gz + tar -xvpzf gawk-4.0.1.tar.gz -Extracting the archive creates a directory named `gawk-4.0.0' in the +Extracting the archive creates a directory named `gawk-4.0.1' in the current directory. The distribution file name is of the form `gawk-V.R.P.tar.gz'. The V represents the major version of `gawk', the R represents the current release of version V, and the P represents a "patch level", meaning that minor bugs have been fixed in the release. The current patch -level is 0, but when retrieving distributions, you should get the +level is 1, but when retrieving distributions, you should get the version with the highest version, release, and patch level. (Note, however, that patch levels greater than or equal to 70 denote "beta" or nonproduction software; you might not want to retrieve such a version @@ -20650,7 +20605,7 @@ Unix-derived systems, GNU/Linux, BSD-based systems, and the Cygwin environment for MS-Windows. After you have extracted the `gawk' distribution, `cd' to -`gawk-4.0.0'. Like most GNU software, `gawk' is configured +`gawk-4.0.1'. Like most GNU software, `gawk' is configured automatically for your system by running the `configure' program. This program is a Bourne shell script that is generated automatically using GNU `autoconf'. (The `autoconf' software is described fully starting @@ -21060,8 +21015,8 @@ tools, such as Bash, the GNU Compiler Collection (GCC), GNU Make, and other GNU programs. Compilation and installation for Cygwin is the same as for a Unix system: - tar -xvpzf gawk-4.0.0.tar.gz - cd gawk-4.0.0 + tar -xvpzf gawk-4.0.1.tar.gz + cd gawk-4.0.1 ./configure make @@ -25042,7 +24997,7 @@ Index * arrays, sorting: Array Sorting Functions. (line 6) * arrays, sorting, IGNORECASE variable and: Array Sorting Functions. - (line 80) + (line 81) * arrays, sparse: Array Intro. (line 71) * arrays, subscripts: Numeric Array Subscripts. (line 6) @@ -26087,7 +26042,7 @@ Index * gawk, functions, adding: Dynamic Extensions. (line 10) * gawk, hexadecimal numbers and: Nondecimal-numbers. (line 42) * gawk, IGNORECASE variable in <1>: Array Sorting Functions. - (line 80) + (line 81) * gawk, IGNORECASE variable in <2>: String Functions. (line 29) * gawk, IGNORECASE variable in <3>: Array Intro. (line 92) * gawk, IGNORECASE variable in <4>: User-modified. (line 82) @@ -26247,13 +26202,13 @@ Index * igawk.sh program: Igawk Program. (line 124) * ignore debugger command: Breakpoint Control. (line 86) * IGNORECASE variable <1>: Array Sorting Functions. - (line 80) + (line 81) * IGNORECASE variable <2>: String Functions. (line 29) * IGNORECASE variable <3>: Array Intro. (line 92) * IGNORECASE variable <4>: User-modified. (line 82) * IGNORECASE variable: Case-sensitivity. (line 26) * IGNORECASE variable, array sorting and: Array Sorting Functions. - (line 80) + (line 81) * IGNORECASE variable, array subscripts and: Array Intro. (line 92) * IGNORECASE variable, in example programs: Library Functions. (line 42) @@ -26936,7 +26891,7 @@ Index * redirection of input: Getline/File. (line 6) * redirection of output: Redirection. (line 6) * reference counting, sorting arrays: Array Sorting Functions. - (line 74) + (line 75) * regexp constants <1>: Comparison Operators. (line 103) * regexp constants <2>: Regexp Constants. (line 6) @@ -27478,417 +27433,416 @@ Index  Tag Table: Node: Top1346 -Node: Foreword33440 -Node: Preface37785 -Ref: Preface-Footnote-140838 -Ref: Preface-Footnote-240944 -Node: History41176 -Node: Names43567 -Ref: Names-Footnote-145044 -Node: This Manual45116 -Ref: This Manual-Footnote-150063 -Node: Conventions50163 -Node: Manual History52297 -Ref: Manual History-Footnote-155567 -Ref: Manual History-Footnote-255608 -Node: How To Contribute55682 -Node: Acknowledgments56826 -Node: Getting Started61157 -Node: Running gawk63536 -Node: One-shot64722 -Node: Read Terminal65947 -Ref: Read Terminal-Footnote-167597 -Ref: Read Terminal-Footnote-267873 -Node: Long68044 -Node: Executable Scripts69420 -Ref: Executable Scripts-Footnote-171289 -Ref: Executable Scripts-Footnote-271391 -Node: Comments71842 -Node: Quoting74309 -Node: DOS Quoting78932 -Node: Sample Data Files79607 -Node: Very Simple82639 -Node: Two Rules87238 -Node: More Complex89385 -Ref: More Complex-Footnote-192315 -Node: Statements/Lines92400 -Ref: Statements/Lines-Footnote-196862 -Node: Other Features97127 -Node: When98055 -Node: Invoking Gawk100202 -Node: Command Line101587 -Node: Options102370 -Ref: Options-Footnote-1115807 -Node: Other Arguments115832 -Node: Naming Standard Input118490 -Node: Environment Variables119584 -Node: AWKPATH Variable120028 -Ref: AWKPATH Variable-Footnote-1122625 -Node: Other Environment Variables122885 -Node: Exit Status125225 -Node: Include Files125900 -Node: Obsolete129385 -Node: Undocumented130071 -Node: Regexp130312 -Node: Regexp Usage131701 -Node: Escape Sequences133727 -Node: Regexp Operators139490 -Ref: Regexp Operators-Footnote-1146687 -Ref: Regexp Operators-Footnote-2146834 -Node: Bracket Expressions146932 -Ref: table-char-classes148822 -Node: GNU Regexp Operators151345 -Node: Case-sensitivity155068 -Ref: Case-sensitivity-Footnote-1158036 -Ref: Case-sensitivity-Footnote-2158271 -Node: Leftmost Longest158379 -Node: Computed Regexps159580 -Node: Reading Files162990 -Node: Records164931 -Ref: Records-Footnote-1173605 -Node: Fields173642 -Ref: Fields-Footnote-1176675 -Node: Nonconstant Fields176761 -Node: Changing Fields178963 -Node: Field Separators184941 -Node: Default Field Splitting187570 -Node: Regexp Field Splitting188687 -Node: Single Character Fields192029 -Node: Command Line Field Separator193088 -Node: Field Splitting Summary196529 -Ref: Field Splitting Summary-Footnote-1199721 -Node: Constant Size199822 -Node: Splitting By Content204406 -Ref: Splitting By Content-Footnote-1208132 -Node: Multiple Line208172 -Ref: Multiple Line-Footnote-1214019 -Node: Getline214198 -Node: Plain Getline216426 -Node: Getline/Variable218515 -Node: Getline/File219656 -Node: Getline/Variable/File220978 -Ref: Getline/Variable/File-Footnote-1222577 -Node: Getline/Pipe222664 -Node: Getline/Variable/Pipe225224 -Node: Getline/Coprocess226331 -Node: Getline/Variable/Coprocess227574 -Node: Getline Notes228288 -Node: Getline Summary230230 -Ref: table-getline-variants230573 -Node: Command line directories231429 -Node: Printing232054 -Node: Print233685 -Node: Print Examples235022 -Node: Output Separators237806 -Node: OFMT239566 -Node: Printf240924 -Node: Basic Printf241830 -Node: Control Letters243369 -Node: Format Modifiers247181 -Node: Printf Examples253190 -Node: Redirection255905 -Node: Special Files262889 -Node: Special FD263422 -Ref: Special FD-Footnote-1267047 -Node: Special Network267121 -Node: Special Caveats267971 -Node: Close Files And Pipes268767 -Ref: Close Files And Pipes-Footnote-1275790 -Ref: Close Files And Pipes-Footnote-2275938 -Node: Expressions276088 -Node: Values277220 -Node: Constants277896 -Node: Scalar Constants278576 -Ref: Scalar Constants-Footnote-1279435 -Node: Nondecimal-numbers279617 -Node: Regexp Constants282676 -Node: Using Constant Regexps283151 -Node: Variables286206 -Node: Using Variables286861 -Node: Assignment Options288585 -Node: Conversion290457 -Ref: table-locale-affects295833 -Ref: Conversion-Footnote-1296457 -Node: All Operators296566 -Node: Arithmetic Ops297196 -Node: Concatenation299701 -Ref: Concatenation-Footnote-1302494 -Node: Assignment Ops302614 -Ref: table-assign-ops307602 -Node: Increment Ops309010 -Node: Truth Values and Conditions312480 -Node: Truth Values313563 -Node: Typing and Comparison314612 -Node: Variable Typing315401 -Ref: Variable Typing-Footnote-1319298 -Node: Comparison Operators319420 -Ref: table-relational-ops319830 -Node: POSIX String Comparison323379 -Ref: POSIX String Comparison-Footnote-1324335 -Node: Boolean Ops324473 -Ref: Boolean Ops-Footnote-1328551 -Node: Conditional Exp328642 -Node: Function Calls330374 -Node: Precedence333968 -Node: Locales337637 -Node: Patterns and Actions338726 -Node: Pattern Overview339780 -Node: Regexp Patterns341446 -Node: Expression Patterns341989 -Node: Ranges345674 -Node: BEGIN/END348640 -Node: Using BEGIN/END349402 -Ref: Using BEGIN/END-Footnote-1352133 -Node: I/O And BEGIN/END352239 -Node: BEGINFILE/ENDFILE354521 -Node: Empty357414 -Node: Using Shell Variables357730 -Node: Action Overview360015 -Node: Statements362372 -Node: If Statement364226 -Node: While Statement365725 -Node: Do Statement367769 -Node: For Statement368925 -Node: Switch Statement372077 -Node: Break Statement374174 -Node: Continue Statement376164 -Node: Next Statement377951 -Node: Nextfile Statement380341 -Node: Exit Statement382886 -Node: Built-in Variables385302 -Node: User-modified386397 -Ref: User-modified-Footnote-1394423 -Node: Auto-set394485 -Ref: Auto-set-Footnote-1403776 -Node: ARGC and ARGV403981 -Node: Arrays407832 -Node: Array Basics409337 -Node: Array Intro410048 -Node: Reference to Elements414366 -Node: Assigning Elements416636 -Node: Array Example417127 -Node: Scanning an Array418859 -Node: Delete421525 -Ref: Delete-Footnote-1423960 -Node: Numeric Array Subscripts424017 -Node: Uninitialized Subscripts426200 -Node: Multi-dimensional427828 -Node: Multi-scanning430922 -Node: Arrays of Arrays432513 -Node: Functions437158 -Node: Built-in437980 -Node: Calling Built-in439058 -Node: Numeric Functions441046 -Ref: Numeric Functions-Footnote-1444811 -Ref: Numeric Functions-Footnote-2445168 -Ref: Numeric Functions-Footnote-3445216 -Node: String Functions445485 -Ref: String Functions-Footnote-1468982 -Ref: String Functions-Footnote-2469111 -Ref: String Functions-Footnote-3469359 -Node: Gory Details469446 -Ref: table-sub-escapes471125 -Ref: table-sub-posix-92472479 -Ref: table-sub-proposed473822 -Ref: table-posix-sub475172 -Ref: table-gensub-escapes476718 -Ref: Gory Details-Footnote-1477925 -Ref: Gory Details-Footnote-2477976 -Node: I/O Functions478127 -Ref: I/O Functions-Footnote-1484782 -Node: Time Functions484929 -Ref: Time Functions-Footnote-1495821 -Ref: Time Functions-Footnote-2495889 -Ref: Time Functions-Footnote-3496047 -Ref: Time Functions-Footnote-4496158 -Ref: Time Functions-Footnote-5496270 -Ref: Time Functions-Footnote-6496497 -Node: Bitwise Functions496763 -Ref: table-bitwise-ops497321 -Ref: Bitwise Functions-Footnote-1501481 -Node: Type Functions501665 -Node: I18N Functions502135 -Node: User-defined503762 -Node: Definition Syntax504566 -Ref: Definition Syntax-Footnote-1509476 -Node: Function Example509545 -Node: Function Caveats512139 -Node: Calling A Function512560 -Node: Variable Scope513675 -Node: Pass By Value/Reference515650 -Node: Return Statement519090 -Node: Dynamic Typing522071 -Node: Indirect Calls522806 -Node: Internationalization532491 -Node: I18N and L10N533917 -Node: Explaining gettext534603 -Ref: Explaining gettext-Footnote-1539669 -Ref: Explaining gettext-Footnote-2539853 -Node: Programmer i18n540018 -Node: Translator i18n544218 -Node: String Extraction545011 -Ref: String Extraction-Footnote-1545972 -Node: Printf Ordering546058 -Ref: Printf Ordering-Footnote-1548842 -Node: I18N Portability548906 -Ref: I18N Portability-Footnote-1551355 -Node: I18N Example551418 -Ref: I18N Example-Footnote-1554053 -Node: Gawk I18N554125 -Node: Advanced Features554742 -Node: Nondecimal Data556255 -Node: Array Sorting557838 -Node: Controlling Array Traversal558538 -Node: Controlling Scanning With A Function559285 -Node: Controlling Scanning566994 -Ref: Controlling Scanning-Footnote-1571648 -Node: Array Sorting Functions571964 -Ref: Array Sorting Functions-Footnote-1575613 -Ref: Array Sorting Functions-Footnote-2575706 -Node: Two-way I/O575900 -Ref: Two-way I/O-Footnote-1581332 -Node: TCP/IP Networking581402 -Node: Profiling584246 -Node: Library Functions591720 -Ref: Library Functions-Footnote-1594727 -Node: Library Names594898 -Ref: Library Names-Footnote-1598369 -Ref: Library Names-Footnote-2598589 -Node: General Functions598675 -Node: Strtonum Function599628 -Node: Assert Function602558 -Node: Round Function605884 -Node: Cliff Random Function607427 -Node: Ordinal Functions608443 -Ref: Ordinal Functions-Footnote-1611513 -Ref: Ordinal Functions-Footnote-2611765 -Node: Join Function611974 -Ref: Join Function-Footnote-1613745 -Node: Gettimeofday Function613945 -Node: Data File Management617660 -Node: Filetrans Function618292 -Node: Rewind Function622431 -Node: File Checking623818 -Node: Empty Files624912 -Node: Ignoring Assigns627142 -Node: Getopt Function628695 -Ref: Getopt Function-Footnote-1639999 -Node: Passwd Functions640202 -Ref: Passwd Functions-Footnote-1649177 -Node: Group Functions649265 -Node: Walking Arrays657349 -Node: Sample Programs658918 -Node: Running Examples659583 -Node: Clones660311 -Node: Cut Program661535 -Node: Egrep Program671380 -Ref: Egrep Program-Footnote-1679153 -Node: Id Program679263 -Node: Split Program682879 -Ref: Split Program-Footnote-1686398 -Node: Tee Program686526 -Node: Uniq Program689329 -Node: Wc Program696758 -Ref: Wc Program-Footnote-1701024 -Ref: Wc Program-Footnote-2701224 -Node: Miscellaneous Programs701316 -Node: Dupword Program702504 -Node: Alarm Program704535 -Node: Translate Program709284 -Ref: Translate Program-Footnote-1713671 -Ref: Translate Program-Footnote-2713899 -Node: Labels Program714033 -Ref: Labels Program-Footnote-1717404 -Node: Word Sorting717488 -Node: History Sorting721372 -Node: Extract Program723211 -Ref: Extract Program-Footnote-1730694 -Node: Simple Sed730822 -Node: Igawk Program733884 -Ref: Igawk Program-Footnote-1749041 -Ref: Igawk Program-Footnote-2749242 -Node: Anagram Program749380 -Node: Signature Program752448 -Node: Debugger753548 -Node: Debugging754459 -Node: Debugging Concepts754872 -Node: Debugging Terms756728 -Node: Awk Debugging759351 -Node: Sample dgawk session760243 -Node: dgawk invocation760735 -Node: Finding The Bug761917 -Node: List of Debugger Commands768403 -Node: Breakpoint Control769714 -Node: Dgawk Execution Control773350 -Node: Viewing And Changing Data776701 -Node: Dgawk Stack780038 -Node: Dgawk Info781498 -Node: Miscellaneous Dgawk Commands785446 -Node: Readline Support790874 -Node: Dgawk Limitations791712 -Node: Language History793901 -Node: V7/SVR3.1795413 -Node: SVR4797734 -Node: POSIX799176 -Node: BTL800184 -Node: POSIX/GNU800918 -Node: Common Extensions806069 -Node: Ranges and Locales807176 -Ref: Ranges and Locales-Footnote-1811783 -Node: Contributors812004 -Node: Installation816266 -Node: Gawk Distribution817160 -Node: Getting817644 -Node: Extracting818470 -Node: Distribution contents820162 -Node: Unix Installation825384 -Node: Quick Installation826001 -Node: Additional Configuration Options827963 -Node: Configuration Philosophy829440 -Node: Non-Unix Installation831782 -Node: PC Installation832240 -Node: PC Binary Installation833539 -Node: PC Compiling835387 -Node: PC Testing838331 -Node: PC Using839507 -Node: Cygwin843692 -Node: MSYS844692 -Node: VMS Installation845206 -Node: VMS Compilation845809 -Ref: VMS Compilation-Footnote-1846816 -Node: VMS Installation Details846874 -Node: VMS Running848509 -Node: VMS Old Gawk850116 -Node: Bugs850590 -Node: Other Versions854442 -Node: Notes859723 -Node: Compatibility Mode860415 -Node: Additions861198 -Node: Accessing The Source862010 -Node: Adding Code863435 -Node: New Ports869402 -Node: Dynamic Extensions873515 -Node: Internals874891 -Node: Plugin License883994 -Node: Sample Library884628 -Node: Internal File Description885314 -Node: Internal File Ops889029 -Ref: Internal File Ops-Footnote-1893810 -Node: Using Internal File Ops893950 -Node: Future Extensions896327 -Node: Basic Concepts898831 -Node: Basic High Level899588 -Ref: Basic High Level-Footnote-1903623 -Node: Basic Data Typing903808 -Node: Floating Point Issues908333 -Node: String Conversion Precision909416 -Ref: String Conversion Precision-Footnote-1911116 -Node: Unexpected Results911225 -Node: POSIX Floating Point Problems913051 -Ref: POSIX Floating Point Problems-Footnote-1916756 -Node: Glossary916794 -Node: Copying941770 -Node: GNU Free Documentation License979327 -Node: Index1004464 +Node: Foreword30270 +Node: Preface34615 +Ref: Preface-Footnote-137668 +Ref: Preface-Footnote-237774 +Node: History38006 +Node: Names40397 +Ref: Names-Footnote-141874 +Node: This Manual41946 +Ref: This Manual-Footnote-146893 +Node: Conventions46993 +Node: Manual History49127 +Ref: Manual History-Footnote-152397 +Ref: Manual History-Footnote-252438 +Node: How To Contribute52512 +Node: Acknowledgments53656 +Node: Getting Started57987 +Node: Running gawk60366 +Node: One-shot61552 +Node: Read Terminal62777 +Ref: Read Terminal-Footnote-164427 +Ref: Read Terminal-Footnote-264703 +Node: Long64874 +Node: Executable Scripts66250 +Ref: Executable Scripts-Footnote-168119 +Ref: Executable Scripts-Footnote-268221 +Node: Comments68672 +Node: Quoting71139 +Node: DOS Quoting75762 +Node: Sample Data Files76437 +Node: Very Simple79469 +Node: Two Rules84068 +Node: More Complex86215 +Ref: More Complex-Footnote-189145 +Node: Statements/Lines89230 +Ref: Statements/Lines-Footnote-193692 +Node: Other Features93957 +Node: When94885 +Node: Invoking Gawk97032 +Node: Command Line98417 +Node: Options99200 +Ref: Options-Footnote-1112637 +Node: Other Arguments112662 +Node: Naming Standard Input115320 +Node: Environment Variables116414 +Node: AWKPATH Variable116858 +Ref: AWKPATH Variable-Footnote-1119455 +Node: Other Environment Variables119715 +Node: Exit Status122055 +Node: Include Files122730 +Node: Obsolete126215 +Node: Undocumented126901 +Node: Regexp127142 +Node: Regexp Usage128531 +Node: Escape Sequences130557 +Node: Regexp Operators136320 +Ref: Regexp Operators-Footnote-1143517 +Ref: Regexp Operators-Footnote-2143664 +Node: Bracket Expressions143762 +Ref: table-char-classes145652 +Node: GNU Regexp Operators148175 +Node: Case-sensitivity151898 +Ref: Case-sensitivity-Footnote-1154866 +Ref: Case-sensitivity-Footnote-2155101 +Node: Leftmost Longest155209 +Node: Computed Regexps156410 +Node: Reading Files159820 +Node: Records161761 +Ref: Records-Footnote-1170435 +Node: Fields170472 +Ref: Fields-Footnote-1173505 +Node: Nonconstant Fields173591 +Node: Changing Fields175793 +Node: Field Separators181771 +Node: Default Field Splitting184400 +Node: Regexp Field Splitting185517 +Node: Single Character Fields188859 +Node: Command Line Field Separator189918 +Node: Field Splitting Summary193359 +Ref: Field Splitting Summary-Footnote-1196551 +Node: Constant Size196652 +Node: Splitting By Content201236 +Ref: Splitting By Content-Footnote-1204962 +Node: Multiple Line205002 +Ref: Multiple Line-Footnote-1210849 +Node: Getline211028 +Node: Plain Getline213256 +Node: Getline/Variable215345 +Node: Getline/File216486 +Node: Getline/Variable/File217808 +Ref: Getline/Variable/File-Footnote-1219407 +Node: Getline/Pipe219494 +Node: Getline/Variable/Pipe222054 +Node: Getline/Coprocess223161 +Node: Getline/Variable/Coprocess224404 +Node: Getline Notes225118 +Node: Getline Summary227060 +Ref: table-getline-variants227403 +Node: Command line directories228259 +Node: Printing228884 +Node: Print230515 +Node: Print Examples231852 +Node: Output Separators234636 +Node: OFMT236396 +Node: Printf237754 +Node: Basic Printf238660 +Node: Control Letters240199 +Node: Format Modifiers244011 +Node: Printf Examples250020 +Node: Redirection252735 +Node: Special Files259719 +Node: Special FD260252 +Ref: Special FD-Footnote-1263877 +Node: Special Network263951 +Node: Special Caveats264801 +Node: Close Files And Pipes265597 +Ref: Close Files And Pipes-Footnote-1272620 +Ref: Close Files And Pipes-Footnote-2272768 +Node: Expressions272918 +Node: Values274050 +Node: Constants274726 +Node: Scalar Constants275406 +Ref: Scalar Constants-Footnote-1276265 +Node: Nondecimal-numbers276447 +Node: Regexp Constants279506 +Node: Using Constant Regexps279981 +Node: Variables283036 +Node: Using Variables283691 +Node: Assignment Options285415 +Node: Conversion287287 +Ref: table-locale-affects292663 +Ref: Conversion-Footnote-1293287 +Node: All Operators293396 +Node: Arithmetic Ops294026 +Node: Concatenation296531 +Ref: Concatenation-Footnote-1299324 +Node: Assignment Ops299444 +Ref: table-assign-ops304432 +Node: Increment Ops305840 +Node: Truth Values and Conditions309310 +Node: Truth Values310393 +Node: Typing and Comparison311442 +Node: Variable Typing312231 +Ref: Variable Typing-Footnote-1316128 +Node: Comparison Operators316250 +Ref: table-relational-ops316660 +Node: POSIX String Comparison320209 +Ref: POSIX String Comparison-Footnote-1321165 +Node: Boolean Ops321303 +Ref: Boolean Ops-Footnote-1325381 +Node: Conditional Exp325472 +Node: Function Calls327204 +Node: Precedence330798 +Node: Locales334467 +Node: Patterns and Actions335556 +Node: Pattern Overview336610 +Node: Regexp Patterns338276 +Node: Expression Patterns338819 +Node: Ranges342504 +Node: BEGIN/END345470 +Node: Using BEGIN/END346232 +Ref: Using BEGIN/END-Footnote-1348963 +Node: I/O And BEGIN/END349069 +Node: BEGINFILE/ENDFILE351351 +Node: Empty354244 +Node: Using Shell Variables354560 +Node: Action Overview356845 +Node: Statements359202 +Node: If Statement361056 +Node: While Statement362555 +Node: Do Statement364599 +Node: For Statement365755 +Node: Switch Statement368907 +Node: Break Statement371004 +Node: Continue Statement372994 +Node: Next Statement374781 +Node: Nextfile Statement377171 +Node: Exit Statement379716 +Node: Built-in Variables382132 +Node: User-modified383227 +Ref: User-modified-Footnote-1391253 +Node: Auto-set391315 +Ref: Auto-set-Footnote-1400606 +Node: ARGC and ARGV400811 +Node: Arrays404662 +Node: Array Basics406167 +Node: Array Intro406993 +Node: Reference to Elements411311 +Node: Assigning Elements413581 +Node: Array Example414072 +Node: Scanning an Array415804 +Node: Controlling Scanning418118 +Ref: Controlling Scanning-Footnote-1423050 +Node: Delete423366 +Ref: Delete-Footnote-1425801 +Node: Numeric Array Subscripts425858 +Node: Uninitialized Subscripts428041 +Node: Multi-dimensional429669 +Node: Multi-scanning432763 +Node: Arrays of Arrays434354 +Node: Functions438999 +Node: Built-in439821 +Node: Calling Built-in440899 +Node: Numeric Functions442887 +Ref: Numeric Functions-Footnote-1446652 +Ref: Numeric Functions-Footnote-2447009 +Ref: Numeric Functions-Footnote-3447057 +Node: String Functions447326 +Ref: String Functions-Footnote-1470823 +Ref: String Functions-Footnote-2470952 +Ref: String Functions-Footnote-3471200 +Node: Gory Details471287 +Ref: table-sub-escapes472966 +Ref: table-sub-posix-92474320 +Ref: table-sub-proposed475663 +Ref: table-posix-sub477013 +Ref: table-gensub-escapes478559 +Ref: Gory Details-Footnote-1479766 +Ref: Gory Details-Footnote-2479817 +Node: I/O Functions479968 +Ref: I/O Functions-Footnote-1486623 +Node: Time Functions486770 +Ref: Time Functions-Footnote-1497662 +Ref: Time Functions-Footnote-2497730 +Ref: Time Functions-Footnote-3497888 +Ref: Time Functions-Footnote-4497999 +Ref: Time Functions-Footnote-5498111 +Ref: Time Functions-Footnote-6498338 +Node: Bitwise Functions498604 +Ref: table-bitwise-ops499162 +Ref: Bitwise Functions-Footnote-1503322 +Node: Type Functions503506 +Node: I18N Functions503976 +Node: User-defined505603 +Node: Definition Syntax506407 +Ref: Definition Syntax-Footnote-1511317 +Node: Function Example511386 +Node: Function Caveats513980 +Node: Calling A Function514401 +Node: Variable Scope515516 +Node: Pass By Value/Reference517491 +Node: Return Statement520931 +Node: Dynamic Typing523912 +Node: Indirect Calls524647 +Node: Internationalization534332 +Node: I18N and L10N535758 +Node: Explaining gettext536444 +Ref: Explaining gettext-Footnote-1541510 +Ref: Explaining gettext-Footnote-2541694 +Node: Programmer i18n541859 +Node: Translator i18n546059 +Node: String Extraction546852 +Ref: String Extraction-Footnote-1547813 +Node: Printf Ordering547899 +Ref: Printf Ordering-Footnote-1550683 +Node: I18N Portability550747 +Ref: I18N Portability-Footnote-1553196 +Node: I18N Example553259 +Ref: I18N Example-Footnote-1555894 +Node: Gawk I18N555966 +Node: Advanced Features556583 +Node: Nondecimal Data558096 +Node: Array Sorting559679 +Node: Controlling Array Traversal560376 +Node: Array Sorting Functions568613 +Ref: Array Sorting Functions-Footnote-1572287 +Ref: Array Sorting Functions-Footnote-2572380 +Node: Two-way I/O572574 +Ref: Two-way I/O-Footnote-1578006 +Node: TCP/IP Networking578076 +Node: Profiling580920 +Node: Library Functions588394 +Ref: Library Functions-Footnote-1591401 +Node: Library Names591572 +Ref: Library Names-Footnote-1595043 +Ref: Library Names-Footnote-2595263 +Node: General Functions595349 +Node: Strtonum Function596302 +Node: Assert Function599232 +Node: Round Function602558 +Node: Cliff Random Function604101 +Node: Ordinal Functions605117 +Ref: Ordinal Functions-Footnote-1608187 +Ref: Ordinal Functions-Footnote-2608439 +Node: Join Function608648 +Ref: Join Function-Footnote-1610419 +Node: Gettimeofday Function610619 +Node: Data File Management614334 +Node: Filetrans Function614966 +Node: Rewind Function619105 +Node: File Checking620492 +Node: Empty Files621586 +Node: Ignoring Assigns623816 +Node: Getopt Function625369 +Ref: Getopt Function-Footnote-1636673 +Node: Passwd Functions636876 +Ref: Passwd Functions-Footnote-1645851 +Node: Group Functions645939 +Node: Walking Arrays654023 +Node: Sample Programs655592 +Node: Running Examples656257 +Node: Clones656985 +Node: Cut Program658209 +Node: Egrep Program668054 +Ref: Egrep Program-Footnote-1675827 +Node: Id Program675937 +Node: Split Program679553 +Ref: Split Program-Footnote-1683072 +Node: Tee Program683200 +Node: Uniq Program686003 +Node: Wc Program693432 +Ref: Wc Program-Footnote-1697698 +Ref: Wc Program-Footnote-2697898 +Node: Miscellaneous Programs697990 +Node: Dupword Program699178 +Node: Alarm Program701209 +Node: Translate Program705958 +Ref: Translate Program-Footnote-1710345 +Ref: Translate Program-Footnote-2710573 +Node: Labels Program710707 +Ref: Labels Program-Footnote-1714078 +Node: Word Sorting714162 +Node: History Sorting718046 +Node: Extract Program719885 +Ref: Extract Program-Footnote-1727368 +Node: Simple Sed727496 +Node: Igawk Program730558 +Ref: Igawk Program-Footnote-1745715 +Ref: Igawk Program-Footnote-2745916 +Node: Anagram Program746054 +Node: Signature Program749122 +Node: Debugger750222 +Node: Debugging751133 +Node: Debugging Concepts751546 +Node: Debugging Terms753402 +Node: Awk Debugging756025 +Node: Sample dgawk session756917 +Node: dgawk invocation757409 +Node: Finding The Bug758591 +Node: List of Debugger Commands765077 +Node: Breakpoint Control766388 +Node: Dgawk Execution Control770024 +Node: Viewing And Changing Data773375 +Node: Dgawk Stack776712 +Node: Dgawk Info778172 +Node: Miscellaneous Dgawk Commands782120 +Node: Readline Support787548 +Node: Dgawk Limitations788386 +Node: Language History790575 +Node: V7/SVR3.1792087 +Node: SVR4794408 +Node: POSIX795850 +Node: BTL796858 +Node: POSIX/GNU797592 +Node: Common Extensions802743 +Node: Ranges and Locales803850 +Ref: Ranges and Locales-Footnote-1808457 +Node: Contributors808678 +Node: Installation812940 +Node: Gawk Distribution813834 +Node: Getting814318 +Node: Extracting815144 +Node: Distribution contents816836 +Node: Unix Installation822058 +Node: Quick Installation822675 +Node: Additional Configuration Options824637 +Node: Configuration Philosophy826114 +Node: Non-Unix Installation828456 +Node: PC Installation828914 +Node: PC Binary Installation830213 +Node: PC Compiling832061 +Node: PC Testing835005 +Node: PC Using836181 +Node: Cygwin840366 +Node: MSYS841366 +Node: VMS Installation841880 +Node: VMS Compilation842483 +Ref: VMS Compilation-Footnote-1843490 +Node: VMS Installation Details843548 +Node: VMS Running845183 +Node: VMS Old Gawk846790 +Node: Bugs847264 +Node: Other Versions851116 +Node: Notes856397 +Node: Compatibility Mode857089 +Node: Additions857872 +Node: Accessing The Source858684 +Node: Adding Code860109 +Node: New Ports866076 +Node: Dynamic Extensions870189 +Node: Internals871565 +Node: Plugin License880668 +Node: Sample Library881302 +Node: Internal File Description881988 +Node: Internal File Ops885703 +Ref: Internal File Ops-Footnote-1890484 +Node: Using Internal File Ops890624 +Node: Future Extensions893001 +Node: Basic Concepts895505 +Node: Basic High Level896262 +Ref: Basic High Level-Footnote-1900297 +Node: Basic Data Typing900482 +Node: Floating Point Issues905007 +Node: String Conversion Precision906090 +Ref: String Conversion Precision-Footnote-1907790 +Node: Unexpected Results907899 +Node: POSIX Floating Point Problems909725 +Ref: POSIX Floating Point Problems-Footnote-1913430 +Node: Glossary913468 +Node: Copying938444 +Node: GNU Free Documentation License976001 +Node: Index1001138  End Tag Table -- cgit v1.2.3 From fd3e8f9c332bd76e7f8fa0c61c1451f52f3b1998 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 16 Nov 2011 19:09:15 +0200 Subject: Minor doc fix. --- doc/gawk.info | 682 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 341 insertions(+), 341 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 06133a6b..877f50d3 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -4056,8 +4056,8 @@ rebuild the entire record, using the current value of the fields and $1 = $1 # force record to be reconstituted print $0 # or whatever else with $0 -This forces `awk' rebuild the record. It does help to add a comment, -as we've shown here. +This forces `awk' to rebuild the record. It does help to add a +comment, as we've shown here. There is a flip side to the relationship between `$0' and the fields. Any assignment to `$0' causes the record to be reparsed into @@ -27505,344 +27505,344 @@ Node: Fields170472 Ref: Fields-Footnote-1173505 Node: Nonconstant Fields173591 Node: Changing Fields175793 -Node: Field Separators181771 -Node: Default Field Splitting184400 -Node: Regexp Field Splitting185517 -Node: Single Character Fields188859 -Node: Command Line Field Separator189918 -Node: Field Splitting Summary193359 -Ref: Field Splitting Summary-Footnote-1196551 -Node: Constant Size196652 -Node: Splitting By Content201236 -Ref: Splitting By Content-Footnote-1204962 -Node: Multiple Line205002 -Ref: Multiple Line-Footnote-1210849 -Node: Getline211028 -Node: Plain Getline213256 -Node: Getline/Variable215345 -Node: Getline/File216486 -Node: Getline/Variable/File217808 -Ref: Getline/Variable/File-Footnote-1219407 -Node: Getline/Pipe219494 -Node: Getline/Variable/Pipe222054 -Node: Getline/Coprocess223161 -Node: Getline/Variable/Coprocess224404 -Node: Getline Notes225118 -Node: Getline Summary227060 -Ref: table-getline-variants227403 -Node: Command line directories228259 -Node: Printing228884 -Node: Print230515 -Node: Print Examples231852 -Node: Output Separators234636 -Node: OFMT236396 -Node: Printf237754 -Node: Basic Printf238660 -Node: Control Letters240199 -Node: Format Modifiers244011 -Node: Printf Examples250020 -Node: Redirection252735 -Node: Special Files259719 -Node: Special FD260252 -Ref: Special FD-Footnote-1263877 -Node: Special Network263951 -Node: Special Caveats264801 -Node: Close Files And Pipes265597 -Ref: Close Files And Pipes-Footnote-1272620 -Ref: Close Files And Pipes-Footnote-2272768 -Node: Expressions272918 -Node: Values274050 -Node: Constants274726 -Node: Scalar Constants275406 -Ref: Scalar Constants-Footnote-1276265 -Node: Nondecimal-numbers276447 -Node: Regexp Constants279506 -Node: Using Constant Regexps279981 -Node: Variables283036 -Node: Using Variables283691 -Node: Assignment Options285415 -Node: Conversion287287 -Ref: table-locale-affects292663 -Ref: Conversion-Footnote-1293287 -Node: All Operators293396 -Node: Arithmetic Ops294026 -Node: Concatenation296531 -Ref: Concatenation-Footnote-1299324 -Node: Assignment Ops299444 -Ref: table-assign-ops304432 -Node: Increment Ops305840 -Node: Truth Values and Conditions309310 -Node: Truth Values310393 -Node: Typing and Comparison311442 -Node: Variable Typing312231 -Ref: Variable Typing-Footnote-1316128 -Node: Comparison Operators316250 -Ref: table-relational-ops316660 -Node: POSIX String Comparison320209 -Ref: POSIX String Comparison-Footnote-1321165 -Node: Boolean Ops321303 -Ref: Boolean Ops-Footnote-1325381 -Node: Conditional Exp325472 -Node: Function Calls327204 -Node: Precedence330798 -Node: Locales334467 -Node: Patterns and Actions335556 -Node: Pattern Overview336610 -Node: Regexp Patterns338276 -Node: Expression Patterns338819 -Node: Ranges342504 -Node: BEGIN/END345470 -Node: Using BEGIN/END346232 -Ref: Using BEGIN/END-Footnote-1348963 -Node: I/O And BEGIN/END349069 -Node: BEGINFILE/ENDFILE351351 -Node: Empty354244 -Node: Using Shell Variables354560 -Node: Action Overview356845 -Node: Statements359202 -Node: If Statement361056 -Node: While Statement362555 -Node: Do Statement364599 -Node: For Statement365755 -Node: Switch Statement368907 -Node: Break Statement371004 -Node: Continue Statement372994 -Node: Next Statement374781 -Node: Nextfile Statement377171 -Node: Exit Statement379716 -Node: Built-in Variables382132 -Node: User-modified383227 -Ref: User-modified-Footnote-1391253 -Node: Auto-set391315 -Ref: Auto-set-Footnote-1400606 -Node: ARGC and ARGV400811 -Node: Arrays404662 -Node: Array Basics406167 -Node: Array Intro406993 -Node: Reference to Elements411311 -Node: Assigning Elements413581 -Node: Array Example414072 -Node: Scanning an Array415804 -Node: Controlling Scanning418118 -Ref: Controlling Scanning-Footnote-1423050 -Node: Delete423366 -Ref: Delete-Footnote-1425801 -Node: Numeric Array Subscripts425858 -Node: Uninitialized Subscripts428041 -Node: Multi-dimensional429669 -Node: Multi-scanning432763 -Node: Arrays of Arrays434354 -Node: Functions438999 -Node: Built-in439821 -Node: Calling Built-in440899 -Node: Numeric Functions442887 -Ref: Numeric Functions-Footnote-1446652 -Ref: Numeric Functions-Footnote-2447009 -Ref: Numeric Functions-Footnote-3447057 -Node: String Functions447326 -Ref: String Functions-Footnote-1470823 -Ref: String Functions-Footnote-2470952 -Ref: String Functions-Footnote-3471200 -Node: Gory Details471287 -Ref: table-sub-escapes472966 -Ref: table-sub-posix-92474320 -Ref: table-sub-proposed475663 -Ref: table-posix-sub477013 -Ref: table-gensub-escapes478559 -Ref: Gory Details-Footnote-1479766 -Ref: Gory Details-Footnote-2479817 -Node: I/O Functions479968 -Ref: I/O Functions-Footnote-1486623 -Node: Time Functions486770 -Ref: Time Functions-Footnote-1497662 -Ref: Time Functions-Footnote-2497730 -Ref: Time Functions-Footnote-3497888 -Ref: Time Functions-Footnote-4497999 -Ref: Time Functions-Footnote-5498111 -Ref: Time Functions-Footnote-6498338 -Node: Bitwise Functions498604 -Ref: table-bitwise-ops499162 -Ref: Bitwise Functions-Footnote-1503322 -Node: Type Functions503506 -Node: I18N Functions503976 -Node: User-defined505603 -Node: Definition Syntax506407 -Ref: Definition Syntax-Footnote-1511317 -Node: Function Example511386 -Node: Function Caveats513980 -Node: Calling A Function514401 -Node: Variable Scope515516 -Node: Pass By Value/Reference517491 -Node: Return Statement520931 -Node: Dynamic Typing523912 -Node: Indirect Calls524647 -Node: Internationalization534332 -Node: I18N and L10N535758 -Node: Explaining gettext536444 -Ref: Explaining gettext-Footnote-1541510 -Ref: Explaining gettext-Footnote-2541694 -Node: Programmer i18n541859 -Node: Translator i18n546059 -Node: String Extraction546852 -Ref: String Extraction-Footnote-1547813 -Node: Printf Ordering547899 -Ref: Printf Ordering-Footnote-1550683 -Node: I18N Portability550747 -Ref: I18N Portability-Footnote-1553196 -Node: I18N Example553259 -Ref: I18N Example-Footnote-1555894 -Node: Gawk I18N555966 -Node: Advanced Features556583 -Node: Nondecimal Data558096 -Node: Array Sorting559679 -Node: Controlling Array Traversal560376 -Node: Array Sorting Functions568613 -Ref: Array Sorting Functions-Footnote-1572287 -Ref: Array Sorting Functions-Footnote-2572380 -Node: Two-way I/O572574 -Ref: Two-way I/O-Footnote-1578006 -Node: TCP/IP Networking578076 -Node: Profiling580920 -Node: Library Functions588394 -Ref: Library Functions-Footnote-1591401 -Node: Library Names591572 -Ref: Library Names-Footnote-1595043 -Ref: Library Names-Footnote-2595263 -Node: General Functions595349 -Node: Strtonum Function596302 -Node: Assert Function599232 -Node: Round Function602558 -Node: Cliff Random Function604101 -Node: Ordinal Functions605117 -Ref: Ordinal Functions-Footnote-1608187 -Ref: Ordinal Functions-Footnote-2608439 -Node: Join Function608648 -Ref: Join Function-Footnote-1610419 -Node: Gettimeofday Function610619 -Node: Data File Management614334 -Node: Filetrans Function614966 -Node: Rewind Function619105 -Node: File Checking620492 -Node: Empty Files621586 -Node: Ignoring Assigns623816 -Node: Getopt Function625369 -Ref: Getopt Function-Footnote-1636673 -Node: Passwd Functions636876 -Ref: Passwd Functions-Footnote-1645851 -Node: Group Functions645939 -Node: Walking Arrays654023 -Node: Sample Programs655592 -Node: Running Examples656257 -Node: Clones656985 -Node: Cut Program658209 -Node: Egrep Program668054 -Ref: Egrep Program-Footnote-1675827 -Node: Id Program675937 -Node: Split Program679553 -Ref: Split Program-Footnote-1683072 -Node: Tee Program683200 -Node: Uniq Program686003 -Node: Wc Program693432 -Ref: Wc Program-Footnote-1697698 -Ref: Wc Program-Footnote-2697898 -Node: Miscellaneous Programs697990 -Node: Dupword Program699178 -Node: Alarm Program701209 -Node: Translate Program705958 -Ref: Translate Program-Footnote-1710345 -Ref: Translate Program-Footnote-2710573 -Node: Labels Program710707 -Ref: Labels Program-Footnote-1714078 -Node: Word Sorting714162 -Node: History Sorting718046 -Node: Extract Program719885 -Ref: Extract Program-Footnote-1727368 -Node: Simple Sed727496 -Node: Igawk Program730558 -Ref: Igawk Program-Footnote-1745715 -Ref: Igawk Program-Footnote-2745916 -Node: Anagram Program746054 -Node: Signature Program749122 -Node: Debugger750222 -Node: Debugging751133 -Node: Debugging Concepts751546 -Node: Debugging Terms753402 -Node: Awk Debugging756025 -Node: Sample dgawk session756917 -Node: dgawk invocation757409 -Node: Finding The Bug758591 -Node: List of Debugger Commands765077 -Node: Breakpoint Control766388 -Node: Dgawk Execution Control770024 -Node: Viewing And Changing Data773375 -Node: Dgawk Stack776712 -Node: Dgawk Info778172 -Node: Miscellaneous Dgawk Commands782120 -Node: Readline Support787548 -Node: Dgawk Limitations788386 -Node: Language History790575 -Node: V7/SVR3.1792087 -Node: SVR4794408 -Node: POSIX795850 -Node: BTL796858 -Node: POSIX/GNU797592 -Node: Common Extensions802743 -Node: Ranges and Locales803850 -Ref: Ranges and Locales-Footnote-1808457 -Node: Contributors808678 -Node: Installation812940 -Node: Gawk Distribution813834 -Node: Getting814318 -Node: Extracting815144 -Node: Distribution contents816836 -Node: Unix Installation822058 -Node: Quick Installation822675 -Node: Additional Configuration Options824637 -Node: Configuration Philosophy826114 -Node: Non-Unix Installation828456 -Node: PC Installation828914 -Node: PC Binary Installation830213 -Node: PC Compiling832061 -Node: PC Testing835005 -Node: PC Using836181 -Node: Cygwin840366 -Node: MSYS841366 -Node: VMS Installation841880 -Node: VMS Compilation842483 -Ref: VMS Compilation-Footnote-1843490 -Node: VMS Installation Details843548 -Node: VMS Running845183 -Node: VMS Old Gawk846790 -Node: Bugs847264 -Node: Other Versions851116 -Node: Notes856397 -Node: Compatibility Mode857089 -Node: Additions857872 -Node: Accessing The Source858684 -Node: Adding Code860109 -Node: New Ports866076 -Node: Dynamic Extensions870189 -Node: Internals871565 -Node: Plugin License880668 -Node: Sample Library881302 -Node: Internal File Description881988 -Node: Internal File Ops885703 -Ref: Internal File Ops-Footnote-1890484 -Node: Using Internal File Ops890624 -Node: Future Extensions893001 -Node: Basic Concepts895505 -Node: Basic High Level896262 -Ref: Basic High Level-Footnote-1900297 -Node: Basic Data Typing900482 -Node: Floating Point Issues905007 -Node: String Conversion Precision906090 -Ref: String Conversion Precision-Footnote-1907790 -Node: Unexpected Results907899 -Node: POSIX Floating Point Problems909725 -Ref: POSIX Floating Point Problems-Footnote-1913430 -Node: Glossary913468 -Node: Copying938444 -Node: GNU Free Documentation License976001 -Node: Index1001138 +Node: Field Separators181774 +Node: Default Field Splitting184403 +Node: Regexp Field Splitting185520 +Node: Single Character Fields188862 +Node: Command Line Field Separator189921 +Node: Field Splitting Summary193362 +Ref: Field Splitting Summary-Footnote-1196554 +Node: Constant Size196655 +Node: Splitting By Content201239 +Ref: Splitting By Content-Footnote-1204965 +Node: Multiple Line205005 +Ref: Multiple Line-Footnote-1210852 +Node: Getline211031 +Node: Plain Getline213259 +Node: Getline/Variable215348 +Node: Getline/File216489 +Node: Getline/Variable/File217811 +Ref: Getline/Variable/File-Footnote-1219410 +Node: Getline/Pipe219497 +Node: Getline/Variable/Pipe222057 +Node: Getline/Coprocess223164 +Node: Getline/Variable/Coprocess224407 +Node: Getline Notes225121 +Node: Getline Summary227063 +Ref: table-getline-variants227406 +Node: Command line directories228262 +Node: Printing228887 +Node: Print230518 +Node: Print Examples231855 +Node: Output Separators234639 +Node: OFMT236399 +Node: Printf237757 +Node: Basic Printf238663 +Node: Control Letters240202 +Node: Format Modifiers244014 +Node: Printf Examples250023 +Node: Redirection252738 +Node: Special Files259722 +Node: Special FD260255 +Ref: Special FD-Footnote-1263880 +Node: Special Network263954 +Node: Special Caveats264804 +Node: Close Files And Pipes265600 +Ref: Close Files And Pipes-Footnote-1272623 +Ref: Close Files And Pipes-Footnote-2272771 +Node: Expressions272921 +Node: Values274053 +Node: Constants274729 +Node: Scalar Constants275409 +Ref: Scalar Constants-Footnote-1276268 +Node: Nondecimal-numbers276450 +Node: Regexp Constants279509 +Node: Using Constant Regexps279984 +Node: Variables283039 +Node: Using Variables283694 +Node: Assignment Options285418 +Node: Conversion287290 +Ref: table-locale-affects292666 +Ref: Conversion-Footnote-1293290 +Node: All Operators293399 +Node: Arithmetic Ops294029 +Node: Concatenation296534 +Ref: Concatenation-Footnote-1299327 +Node: Assignment Ops299447 +Ref: table-assign-ops304435 +Node: Increment Ops305843 +Node: Truth Values and Conditions309313 +Node: Truth Values310396 +Node: Typing and Comparison311445 +Node: Variable Typing312234 +Ref: Variable Typing-Footnote-1316131 +Node: Comparison Operators316253 +Ref: table-relational-ops316663 +Node: POSIX String Comparison320212 +Ref: POSIX String Comparison-Footnote-1321168 +Node: Boolean Ops321306 +Ref: Boolean Ops-Footnote-1325384 +Node: Conditional Exp325475 +Node: Function Calls327207 +Node: Precedence330801 +Node: Locales334470 +Node: Patterns and Actions335559 +Node: Pattern Overview336613 +Node: Regexp Patterns338279 +Node: Expression Patterns338822 +Node: Ranges342507 +Node: BEGIN/END345473 +Node: Using BEGIN/END346235 +Ref: Using BEGIN/END-Footnote-1348966 +Node: I/O And BEGIN/END349072 +Node: BEGINFILE/ENDFILE351354 +Node: Empty354247 +Node: Using Shell Variables354563 +Node: Action Overview356848 +Node: Statements359205 +Node: If Statement361059 +Node: While Statement362558 +Node: Do Statement364602 +Node: For Statement365758 +Node: Switch Statement368910 +Node: Break Statement371007 +Node: Continue Statement372997 +Node: Next Statement374784 +Node: Nextfile Statement377174 +Node: Exit Statement379719 +Node: Built-in Variables382135 +Node: User-modified383230 +Ref: User-modified-Footnote-1391256 +Node: Auto-set391318 +Ref: Auto-set-Footnote-1400609 +Node: ARGC and ARGV400814 +Node: Arrays404665 +Node: Array Basics406170 +Node: Array Intro406996 +Node: Reference to Elements411314 +Node: Assigning Elements413584 +Node: Array Example414075 +Node: Scanning an Array415807 +Node: Controlling Scanning418121 +Ref: Controlling Scanning-Footnote-1423053 +Node: Delete423369 +Ref: Delete-Footnote-1425804 +Node: Numeric Array Subscripts425861 +Node: Uninitialized Subscripts428044 +Node: Multi-dimensional429672 +Node: Multi-scanning432766 +Node: Arrays of Arrays434357 +Node: Functions439002 +Node: Built-in439824 +Node: Calling Built-in440902 +Node: Numeric Functions442890 +Ref: Numeric Functions-Footnote-1446655 +Ref: Numeric Functions-Footnote-2447012 +Ref: Numeric Functions-Footnote-3447060 +Node: String Functions447329 +Ref: String Functions-Footnote-1470826 +Ref: String Functions-Footnote-2470955 +Ref: String Functions-Footnote-3471203 +Node: Gory Details471290 +Ref: table-sub-escapes472969 +Ref: table-sub-posix-92474323 +Ref: table-sub-proposed475666 +Ref: table-posix-sub477016 +Ref: table-gensub-escapes478562 +Ref: Gory Details-Footnote-1479769 +Ref: Gory Details-Footnote-2479820 +Node: I/O Functions479971 +Ref: I/O Functions-Footnote-1486626 +Node: Time Functions486773 +Ref: Time Functions-Footnote-1497665 +Ref: Time Functions-Footnote-2497733 +Ref: Time Functions-Footnote-3497891 +Ref: Time Functions-Footnote-4498002 +Ref: Time Functions-Footnote-5498114 +Ref: Time Functions-Footnote-6498341 +Node: Bitwise Functions498607 +Ref: table-bitwise-ops499165 +Ref: Bitwise Functions-Footnote-1503325 +Node: Type Functions503509 +Node: I18N Functions503979 +Node: User-defined505606 +Node: Definition Syntax506410 +Ref: Definition Syntax-Footnote-1511320 +Node: Function Example511389 +Node: Function Caveats513983 +Node: Calling A Function514404 +Node: Variable Scope515519 +Node: Pass By Value/Reference517494 +Node: Return Statement520934 +Node: Dynamic Typing523915 +Node: Indirect Calls524650 +Node: Internationalization534335 +Node: I18N and L10N535761 +Node: Explaining gettext536447 +Ref: Explaining gettext-Footnote-1541513 +Ref: Explaining gettext-Footnote-2541697 +Node: Programmer i18n541862 +Node: Translator i18n546062 +Node: String Extraction546855 +Ref: String Extraction-Footnote-1547816 +Node: Printf Ordering547902 +Ref: Printf Ordering-Footnote-1550686 +Node: I18N Portability550750 +Ref: I18N Portability-Footnote-1553199 +Node: I18N Example553262 +Ref: I18N Example-Footnote-1555897 +Node: Gawk I18N555969 +Node: Advanced Features556586 +Node: Nondecimal Data558099 +Node: Array Sorting559682 +Node: Controlling Array Traversal560379 +Node: Array Sorting Functions568616 +Ref: Array Sorting Functions-Footnote-1572290 +Ref: Array Sorting Functions-Footnote-2572383 +Node: Two-way I/O572577 +Ref: Two-way I/O-Footnote-1578009 +Node: TCP/IP Networking578079 +Node: Profiling580923 +Node: Library Functions588397 +Ref: Library Functions-Footnote-1591404 +Node: Library Names591575 +Ref: Library Names-Footnote-1595046 +Ref: Library Names-Footnote-2595266 +Node: General Functions595352 +Node: Strtonum Function596305 +Node: Assert Function599235 +Node: Round Function602561 +Node: Cliff Random Function604104 +Node: Ordinal Functions605120 +Ref: Ordinal Functions-Footnote-1608190 +Ref: Ordinal Functions-Footnote-2608442 +Node: Join Function608651 +Ref: Join Function-Footnote-1610422 +Node: Gettimeofday Function610622 +Node: Data File Management614337 +Node: Filetrans Function614969 +Node: Rewind Function619108 +Node: File Checking620495 +Node: Empty Files621589 +Node: Ignoring Assigns623819 +Node: Getopt Function625372 +Ref: Getopt Function-Footnote-1636676 +Node: Passwd Functions636879 +Ref: Passwd Functions-Footnote-1645854 +Node: Group Functions645942 +Node: Walking Arrays654026 +Node: Sample Programs655595 +Node: Running Examples656260 +Node: Clones656988 +Node: Cut Program658212 +Node: Egrep Program668057 +Ref: Egrep Program-Footnote-1675830 +Node: Id Program675940 +Node: Split Program679556 +Ref: Split Program-Footnote-1683075 +Node: Tee Program683203 +Node: Uniq Program686006 +Node: Wc Program693435 +Ref: Wc Program-Footnote-1697701 +Ref: Wc Program-Footnote-2697901 +Node: Miscellaneous Programs697993 +Node: Dupword Program699181 +Node: Alarm Program701212 +Node: Translate Program705961 +Ref: Translate Program-Footnote-1710348 +Ref: Translate Program-Footnote-2710576 +Node: Labels Program710710 +Ref: Labels Program-Footnote-1714081 +Node: Word Sorting714165 +Node: History Sorting718049 +Node: Extract Program719888 +Ref: Extract Program-Footnote-1727371 +Node: Simple Sed727499 +Node: Igawk Program730561 +Ref: Igawk Program-Footnote-1745718 +Ref: Igawk Program-Footnote-2745919 +Node: Anagram Program746057 +Node: Signature Program749125 +Node: Debugger750225 +Node: Debugging751136 +Node: Debugging Concepts751549 +Node: Debugging Terms753405 +Node: Awk Debugging756028 +Node: Sample dgawk session756920 +Node: dgawk invocation757412 +Node: Finding The Bug758594 +Node: List of Debugger Commands765080 +Node: Breakpoint Control766391 +Node: Dgawk Execution Control770027 +Node: Viewing And Changing Data773378 +Node: Dgawk Stack776715 +Node: Dgawk Info778175 +Node: Miscellaneous Dgawk Commands782123 +Node: Readline Support787551 +Node: Dgawk Limitations788389 +Node: Language History790578 +Node: V7/SVR3.1792090 +Node: SVR4794411 +Node: POSIX795853 +Node: BTL796861 +Node: POSIX/GNU797595 +Node: Common Extensions802746 +Node: Ranges and Locales803853 +Ref: Ranges and Locales-Footnote-1808460 +Node: Contributors808681 +Node: Installation812943 +Node: Gawk Distribution813837 +Node: Getting814321 +Node: Extracting815147 +Node: Distribution contents816839 +Node: Unix Installation822061 +Node: Quick Installation822678 +Node: Additional Configuration Options824640 +Node: Configuration Philosophy826117 +Node: Non-Unix Installation828459 +Node: PC Installation828917 +Node: PC Binary Installation830216 +Node: PC Compiling832064 +Node: PC Testing835008 +Node: PC Using836184 +Node: Cygwin840369 +Node: MSYS841369 +Node: VMS Installation841883 +Node: VMS Compilation842486 +Ref: VMS Compilation-Footnote-1843493 +Node: VMS Installation Details843551 +Node: VMS Running845186 +Node: VMS Old Gawk846793 +Node: Bugs847267 +Node: Other Versions851119 +Node: Notes856400 +Node: Compatibility Mode857092 +Node: Additions857875 +Node: Accessing The Source858687 +Node: Adding Code860112 +Node: New Ports866079 +Node: Dynamic Extensions870192 +Node: Internals871568 +Node: Plugin License880671 +Node: Sample Library881305 +Node: Internal File Description881991 +Node: Internal File Ops885706 +Ref: Internal File Ops-Footnote-1890487 +Node: Using Internal File Ops890627 +Node: Future Extensions893004 +Node: Basic Concepts895508 +Node: Basic High Level896265 +Ref: Basic High Level-Footnote-1900300 +Node: Basic Data Typing900485 +Node: Floating Point Issues905010 +Node: String Conversion Precision906093 +Ref: String Conversion Precision-Footnote-1907793 +Node: Unexpected Results907902 +Node: POSIX Floating Point Problems909728 +Ref: POSIX Floating Point Problems-Footnote-1913433 +Node: Glossary913471 +Node: Copying938447 +Node: GNU Free Documentation License976004 +Node: Index1001141  End Tag Table -- cgit v1.2.3 From c45c07f2825065fdeb701c5dff763b988f6d9653 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 6 Dec 2011 21:35:33 +0200 Subject: Documentation updates of various sorts. --- doc/gawk.info | 526 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 263 insertions(+), 263 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 877f50d3..38ddd47c 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -7973,7 +7973,7 @@ summary of the types of `awk' patterns: `BEGINFILE' `ENDFILE' - Special patterns for you to supply startup or cleanup actions to + Special patterns for you to supply startup or cleanup actions to be done on a per file basis. (*Note BEGINFILE/ENDFILE::.) `EMPTY' @@ -8852,12 +8852,12 @@ the previous example with the following `while' loop: This program loops forever once `x' reaches 5. The `continue' statement has no special meaning with respect to the -`switch' statement, nor does it any meaning when used outside the body -of a loop. Historical versions of `awk' treated a `continue' statement -outside a loop the same way they treated a `break' statement outside a -loop: as if it were a `next' statement (*note Next Statement::). -(d.c.) Recent versions of Brian Kernighan's `awk' no longer work this -way, nor does `gawk'. +`switch' statement, nor does it have any meaning when used outside the +body of a loop. Historical versions of `awk' treated a `continue' +statement outside a loop the same way they treated a `break' statement +outside a loop: as if it were a `next' statement (*note Next +Statement::). (d.c.) Recent versions of Brian Kernighan's `awk' no +longer work this way, nor does `gawk'.  File: gawk.info, Node: Next Statement, Next: Nextfile Statement, Prev: Continue Statement, Up: Statements @@ -27588,261 +27588,261 @@ Node: Precedence330801 Node: Locales334470 Node: Patterns and Actions335559 Node: Pattern Overview336613 -Node: Regexp Patterns338279 -Node: Expression Patterns338822 -Node: Ranges342507 -Node: BEGIN/END345473 -Node: Using BEGIN/END346235 -Ref: Using BEGIN/END-Footnote-1348966 -Node: I/O And BEGIN/END349072 -Node: BEGINFILE/ENDFILE351354 -Node: Empty354247 -Node: Using Shell Variables354563 -Node: Action Overview356848 -Node: Statements359205 -Node: If Statement361059 -Node: While Statement362558 -Node: Do Statement364602 -Node: For Statement365758 -Node: Switch Statement368910 -Node: Break Statement371007 -Node: Continue Statement372997 -Node: Next Statement374784 -Node: Nextfile Statement377174 -Node: Exit Statement379719 -Node: Built-in Variables382135 -Node: User-modified383230 -Ref: User-modified-Footnote-1391256 -Node: Auto-set391318 -Ref: Auto-set-Footnote-1400609 -Node: ARGC and ARGV400814 -Node: Arrays404665 -Node: Array Basics406170 -Node: Array Intro406996 -Node: Reference to Elements411314 -Node: Assigning Elements413584 -Node: Array Example414075 -Node: Scanning an Array415807 -Node: Controlling Scanning418121 -Ref: Controlling Scanning-Footnote-1423053 -Node: Delete423369 -Ref: Delete-Footnote-1425804 -Node: Numeric Array Subscripts425861 -Node: Uninitialized Subscripts428044 -Node: Multi-dimensional429672 -Node: Multi-scanning432766 -Node: Arrays of Arrays434357 -Node: Functions439002 -Node: Built-in439824 -Node: Calling Built-in440902 -Node: Numeric Functions442890 -Ref: Numeric Functions-Footnote-1446655 -Ref: Numeric Functions-Footnote-2447012 -Ref: Numeric Functions-Footnote-3447060 -Node: String Functions447329 -Ref: String Functions-Footnote-1470826 -Ref: String Functions-Footnote-2470955 -Ref: String Functions-Footnote-3471203 -Node: Gory Details471290 -Ref: table-sub-escapes472969 -Ref: table-sub-posix-92474323 -Ref: table-sub-proposed475666 -Ref: table-posix-sub477016 -Ref: table-gensub-escapes478562 -Ref: Gory Details-Footnote-1479769 -Ref: Gory Details-Footnote-2479820 -Node: I/O Functions479971 -Ref: I/O Functions-Footnote-1486626 -Node: Time Functions486773 -Ref: Time Functions-Footnote-1497665 -Ref: Time Functions-Footnote-2497733 -Ref: Time Functions-Footnote-3497891 -Ref: Time Functions-Footnote-4498002 -Ref: Time Functions-Footnote-5498114 -Ref: Time Functions-Footnote-6498341 -Node: Bitwise Functions498607 -Ref: table-bitwise-ops499165 -Ref: Bitwise Functions-Footnote-1503325 -Node: Type Functions503509 -Node: I18N Functions503979 -Node: User-defined505606 -Node: Definition Syntax506410 -Ref: Definition Syntax-Footnote-1511320 -Node: Function Example511389 -Node: Function Caveats513983 -Node: Calling A Function514404 -Node: Variable Scope515519 -Node: Pass By Value/Reference517494 -Node: Return Statement520934 -Node: Dynamic Typing523915 -Node: Indirect Calls524650 -Node: Internationalization534335 -Node: I18N and L10N535761 -Node: Explaining gettext536447 -Ref: Explaining gettext-Footnote-1541513 -Ref: Explaining gettext-Footnote-2541697 -Node: Programmer i18n541862 -Node: Translator i18n546062 -Node: String Extraction546855 -Ref: String Extraction-Footnote-1547816 -Node: Printf Ordering547902 -Ref: Printf Ordering-Footnote-1550686 -Node: I18N Portability550750 -Ref: I18N Portability-Footnote-1553199 -Node: I18N Example553262 -Ref: I18N Example-Footnote-1555897 -Node: Gawk I18N555969 -Node: Advanced Features556586 -Node: Nondecimal Data558099 -Node: Array Sorting559682 -Node: Controlling Array Traversal560379 -Node: Array Sorting Functions568616 -Ref: Array Sorting Functions-Footnote-1572290 -Ref: Array Sorting Functions-Footnote-2572383 -Node: Two-way I/O572577 -Ref: Two-way I/O-Footnote-1578009 -Node: TCP/IP Networking578079 -Node: Profiling580923 -Node: Library Functions588397 -Ref: Library Functions-Footnote-1591404 -Node: Library Names591575 -Ref: Library Names-Footnote-1595046 -Ref: Library Names-Footnote-2595266 -Node: General Functions595352 -Node: Strtonum Function596305 -Node: Assert Function599235 -Node: Round Function602561 -Node: Cliff Random Function604104 -Node: Ordinal Functions605120 -Ref: Ordinal Functions-Footnote-1608190 -Ref: Ordinal Functions-Footnote-2608442 -Node: Join Function608651 -Ref: Join Function-Footnote-1610422 -Node: Gettimeofday Function610622 -Node: Data File Management614337 -Node: Filetrans Function614969 -Node: Rewind Function619108 -Node: File Checking620495 -Node: Empty Files621589 -Node: Ignoring Assigns623819 -Node: Getopt Function625372 -Ref: Getopt Function-Footnote-1636676 -Node: Passwd Functions636879 -Ref: Passwd Functions-Footnote-1645854 -Node: Group Functions645942 -Node: Walking Arrays654026 -Node: Sample Programs655595 -Node: Running Examples656260 -Node: Clones656988 -Node: Cut Program658212 -Node: Egrep Program668057 -Ref: Egrep Program-Footnote-1675830 -Node: Id Program675940 -Node: Split Program679556 -Ref: Split Program-Footnote-1683075 -Node: Tee Program683203 -Node: Uniq Program686006 -Node: Wc Program693435 -Ref: Wc Program-Footnote-1697701 -Ref: Wc Program-Footnote-2697901 -Node: Miscellaneous Programs697993 -Node: Dupword Program699181 -Node: Alarm Program701212 -Node: Translate Program705961 -Ref: Translate Program-Footnote-1710348 -Ref: Translate Program-Footnote-2710576 -Node: Labels Program710710 -Ref: Labels Program-Footnote-1714081 -Node: Word Sorting714165 -Node: History Sorting718049 -Node: Extract Program719888 -Ref: Extract Program-Footnote-1727371 -Node: Simple Sed727499 -Node: Igawk Program730561 -Ref: Igawk Program-Footnote-1745718 -Ref: Igawk Program-Footnote-2745919 -Node: Anagram Program746057 -Node: Signature Program749125 -Node: Debugger750225 -Node: Debugging751136 -Node: Debugging Concepts751549 -Node: Debugging Terms753405 -Node: Awk Debugging756028 -Node: Sample dgawk session756920 -Node: dgawk invocation757412 -Node: Finding The Bug758594 -Node: List of Debugger Commands765080 -Node: Breakpoint Control766391 -Node: Dgawk Execution Control770027 -Node: Viewing And Changing Data773378 -Node: Dgawk Stack776715 -Node: Dgawk Info778175 -Node: Miscellaneous Dgawk Commands782123 -Node: Readline Support787551 -Node: Dgawk Limitations788389 -Node: Language History790578 -Node: V7/SVR3.1792090 -Node: SVR4794411 -Node: POSIX795853 -Node: BTL796861 -Node: POSIX/GNU797595 -Node: Common Extensions802746 -Node: Ranges and Locales803853 -Ref: Ranges and Locales-Footnote-1808460 -Node: Contributors808681 -Node: Installation812943 -Node: Gawk Distribution813837 -Node: Getting814321 -Node: Extracting815147 -Node: Distribution contents816839 -Node: Unix Installation822061 -Node: Quick Installation822678 -Node: Additional Configuration Options824640 -Node: Configuration Philosophy826117 -Node: Non-Unix Installation828459 -Node: PC Installation828917 -Node: PC Binary Installation830216 -Node: PC Compiling832064 -Node: PC Testing835008 -Node: PC Using836184 -Node: Cygwin840369 -Node: MSYS841369 -Node: VMS Installation841883 -Node: VMS Compilation842486 -Ref: VMS Compilation-Footnote-1843493 -Node: VMS Installation Details843551 -Node: VMS Running845186 -Node: VMS Old Gawk846793 -Node: Bugs847267 -Node: Other Versions851119 -Node: Notes856400 -Node: Compatibility Mode857092 -Node: Additions857875 -Node: Accessing The Source858687 -Node: Adding Code860112 -Node: New Ports866079 -Node: Dynamic Extensions870192 -Node: Internals871568 -Node: Plugin License880671 -Node: Sample Library881305 -Node: Internal File Description881991 -Node: Internal File Ops885706 -Ref: Internal File Ops-Footnote-1890487 -Node: Using Internal File Ops890627 -Node: Future Extensions893004 -Node: Basic Concepts895508 -Node: Basic High Level896265 -Ref: Basic High Level-Footnote-1900300 -Node: Basic Data Typing900485 -Node: Floating Point Issues905010 -Node: String Conversion Precision906093 -Ref: String Conversion Precision-Footnote-1907793 -Node: Unexpected Results907902 -Node: POSIX Floating Point Problems909728 -Ref: POSIX Floating Point Problems-Footnote-1913433 -Node: Glossary913471 -Node: Copying938447 -Node: GNU Free Documentation License976004 -Node: Index1001141 +Node: Regexp Patterns338282 +Node: Expression Patterns338825 +Node: Ranges342510 +Node: BEGIN/END345476 +Node: Using BEGIN/END346238 +Ref: Using BEGIN/END-Footnote-1348969 +Node: I/O And BEGIN/END349075 +Node: BEGINFILE/ENDFILE351357 +Node: Empty354250 +Node: Using Shell Variables354566 +Node: Action Overview356851 +Node: Statements359208 +Node: If Statement361062 +Node: While Statement362561 +Node: Do Statement364605 +Node: For Statement365761 +Node: Switch Statement368913 +Node: Break Statement371010 +Node: Continue Statement373000 +Node: Next Statement374793 +Node: Nextfile Statement377183 +Node: Exit Statement379728 +Node: Built-in Variables382144 +Node: User-modified383239 +Ref: User-modified-Footnote-1391265 +Node: Auto-set391327 +Ref: Auto-set-Footnote-1400618 +Node: ARGC and ARGV400823 +Node: Arrays404674 +Node: Array Basics406179 +Node: Array Intro407005 +Node: Reference to Elements411323 +Node: Assigning Elements413593 +Node: Array Example414084 +Node: Scanning an Array415816 +Node: Controlling Scanning418130 +Ref: Controlling Scanning-Footnote-1423062 +Node: Delete423378 +Ref: Delete-Footnote-1425813 +Node: Numeric Array Subscripts425870 +Node: Uninitialized Subscripts428053 +Node: Multi-dimensional429681 +Node: Multi-scanning432775 +Node: Arrays of Arrays434366 +Node: Functions439011 +Node: Built-in439833 +Node: Calling Built-in440911 +Node: Numeric Functions442899 +Ref: Numeric Functions-Footnote-1446664 +Ref: Numeric Functions-Footnote-2447021 +Ref: Numeric Functions-Footnote-3447069 +Node: String Functions447338 +Ref: String Functions-Footnote-1470835 +Ref: String Functions-Footnote-2470964 +Ref: String Functions-Footnote-3471212 +Node: Gory Details471299 +Ref: table-sub-escapes472978 +Ref: table-sub-posix-92474332 +Ref: table-sub-proposed475675 +Ref: table-posix-sub477025 +Ref: table-gensub-escapes478571 +Ref: Gory Details-Footnote-1479778 +Ref: Gory Details-Footnote-2479829 +Node: I/O Functions479980 +Ref: I/O Functions-Footnote-1486635 +Node: Time Functions486782 +Ref: Time Functions-Footnote-1497674 +Ref: Time Functions-Footnote-2497742 +Ref: Time Functions-Footnote-3497900 +Ref: Time Functions-Footnote-4498011 +Ref: Time Functions-Footnote-5498123 +Ref: Time Functions-Footnote-6498350 +Node: Bitwise Functions498616 +Ref: table-bitwise-ops499174 +Ref: Bitwise Functions-Footnote-1503334 +Node: Type Functions503518 +Node: I18N Functions503988 +Node: User-defined505615 +Node: Definition Syntax506419 +Ref: Definition Syntax-Footnote-1511329 +Node: Function Example511398 +Node: Function Caveats513992 +Node: Calling A Function514413 +Node: Variable Scope515528 +Node: Pass By Value/Reference517503 +Node: Return Statement520943 +Node: Dynamic Typing523924 +Node: Indirect Calls524659 +Node: Internationalization534344 +Node: I18N and L10N535770 +Node: Explaining gettext536456 +Ref: Explaining gettext-Footnote-1541522 +Ref: Explaining gettext-Footnote-2541706 +Node: Programmer i18n541871 +Node: Translator i18n546071 +Node: String Extraction546864 +Ref: String Extraction-Footnote-1547825 +Node: Printf Ordering547911 +Ref: Printf Ordering-Footnote-1550695 +Node: I18N Portability550759 +Ref: I18N Portability-Footnote-1553208 +Node: I18N Example553271 +Ref: I18N Example-Footnote-1555906 +Node: Gawk I18N555978 +Node: Advanced Features556595 +Node: Nondecimal Data558108 +Node: Array Sorting559691 +Node: Controlling Array Traversal560388 +Node: Array Sorting Functions568625 +Ref: Array Sorting Functions-Footnote-1572299 +Ref: Array Sorting Functions-Footnote-2572392 +Node: Two-way I/O572586 +Ref: Two-way I/O-Footnote-1578018 +Node: TCP/IP Networking578088 +Node: Profiling580932 +Node: Library Functions588406 +Ref: Library Functions-Footnote-1591413 +Node: Library Names591584 +Ref: Library Names-Footnote-1595055 +Ref: Library Names-Footnote-2595275 +Node: General Functions595361 +Node: Strtonum Function596314 +Node: Assert Function599244 +Node: Round Function602570 +Node: Cliff Random Function604113 +Node: Ordinal Functions605129 +Ref: Ordinal Functions-Footnote-1608199 +Ref: Ordinal Functions-Footnote-2608451 +Node: Join Function608660 +Ref: Join Function-Footnote-1610431 +Node: Gettimeofday Function610631 +Node: Data File Management614346 +Node: Filetrans Function614978 +Node: Rewind Function619117 +Node: File Checking620504 +Node: Empty Files621598 +Node: Ignoring Assigns623828 +Node: Getopt Function625381 +Ref: Getopt Function-Footnote-1636685 +Node: Passwd Functions636888 +Ref: Passwd Functions-Footnote-1645863 +Node: Group Functions645951 +Node: Walking Arrays654035 +Node: Sample Programs655604 +Node: Running Examples656269 +Node: Clones656997 +Node: Cut Program658221 +Node: Egrep Program668066 +Ref: Egrep Program-Footnote-1675839 +Node: Id Program675949 +Node: Split Program679565 +Ref: Split Program-Footnote-1683084 +Node: Tee Program683212 +Node: Uniq Program686015 +Node: Wc Program693444 +Ref: Wc Program-Footnote-1697710 +Ref: Wc Program-Footnote-2697910 +Node: Miscellaneous Programs698002 +Node: Dupword Program699190 +Node: Alarm Program701221 +Node: Translate Program705970 +Ref: Translate Program-Footnote-1710357 +Ref: Translate Program-Footnote-2710585 +Node: Labels Program710719 +Ref: Labels Program-Footnote-1714090 +Node: Word Sorting714174 +Node: History Sorting718058 +Node: Extract Program719897 +Ref: Extract Program-Footnote-1727380 +Node: Simple Sed727508 +Node: Igawk Program730570 +Ref: Igawk Program-Footnote-1745727 +Ref: Igawk Program-Footnote-2745928 +Node: Anagram Program746066 +Node: Signature Program749134 +Node: Debugger750234 +Node: Debugging751145 +Node: Debugging Concepts751558 +Node: Debugging Terms753414 +Node: Awk Debugging756037 +Node: Sample dgawk session756929 +Node: dgawk invocation757421 +Node: Finding The Bug758603 +Node: List of Debugger Commands765089 +Node: Breakpoint Control766400 +Node: Dgawk Execution Control770036 +Node: Viewing And Changing Data773387 +Node: Dgawk Stack776724 +Node: Dgawk Info778184 +Node: Miscellaneous Dgawk Commands782132 +Node: Readline Support787560 +Node: Dgawk Limitations788398 +Node: Language History790587 +Node: V7/SVR3.1792099 +Node: SVR4794420 +Node: POSIX795862 +Node: BTL796870 +Node: POSIX/GNU797604 +Node: Common Extensions802755 +Node: Ranges and Locales803862 +Ref: Ranges and Locales-Footnote-1808469 +Node: Contributors808690 +Node: Installation812952 +Node: Gawk Distribution813846 +Node: Getting814330 +Node: Extracting815156 +Node: Distribution contents816848 +Node: Unix Installation822070 +Node: Quick Installation822687 +Node: Additional Configuration Options824649 +Node: Configuration Philosophy826126 +Node: Non-Unix Installation828468 +Node: PC Installation828926 +Node: PC Binary Installation830225 +Node: PC Compiling832073 +Node: PC Testing835017 +Node: PC Using836193 +Node: Cygwin840378 +Node: MSYS841378 +Node: VMS Installation841892 +Node: VMS Compilation842495 +Ref: VMS Compilation-Footnote-1843502 +Node: VMS Installation Details843560 +Node: VMS Running845195 +Node: VMS Old Gawk846802 +Node: Bugs847276 +Node: Other Versions851128 +Node: Notes856409 +Node: Compatibility Mode857101 +Node: Additions857884 +Node: Accessing The Source858696 +Node: Adding Code860121 +Node: New Ports866088 +Node: Dynamic Extensions870201 +Node: Internals871577 +Node: Plugin License880680 +Node: Sample Library881314 +Node: Internal File Description882000 +Node: Internal File Ops885715 +Ref: Internal File Ops-Footnote-1890496 +Node: Using Internal File Ops890636 +Node: Future Extensions893013 +Node: Basic Concepts895517 +Node: Basic High Level896274 +Ref: Basic High Level-Footnote-1900309 +Node: Basic Data Typing900494 +Node: Floating Point Issues905019 +Node: String Conversion Precision906102 +Ref: String Conversion Precision-Footnote-1907802 +Node: Unexpected Results907911 +Node: POSIX Floating Point Problems909737 +Ref: POSIX Floating Point Problems-Footnote-1913442 +Node: Glossary913480 +Node: Copying938456 +Node: GNU Free Documentation License976013 +Node: Index1001150  End Tag Table -- cgit v1.2.3 From 1527865d3c430aa203ed23fa7ecbeea30a604724 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 6 Dec 2011 22:00:01 +0200 Subject: Update doc/gawk.info too. --- doc/gawk.info | 450 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 225 insertions(+), 225 deletions(-) (limited to 'doc/gawk.info') diff --git a/doc/gawk.info b/doc/gawk.info index 38ddd47c..8d9422f2 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -9905,7 +9905,7 @@ internal implementation of arrays and will vary from one version of Often, though, you may wish to do something simple, such as "traverse the array by comparing the indices in ascending order," or "traverse the array by on comparing the values in descending order." -`gawk' provides two mechanims which give you this control. +`gawk' provides two mechanisms which give you this control. * Set `PROCINFO["sorted_in"]' to one of a set of predefined values. We describe this now. @@ -13730,7 +13730,7 @@ specific field position and can be used for this purpose: } The first field in each entry of the password file is the user's -login name, and the fields are seperated by colons. Each record +login name, and the fields are separated by colons. Each record defines a subarray, with each field as an element in the subarray. Running the program produces the following output: @@ -20127,14 +20127,14 @@ inclusive. Ordering was based on the numeric value of each character in the machine's native character set. Thus, on ASCII-based systems, `[a-z]' matched all the lowercase letters, and only the lowercase letters, since the numeric values for the letters from `a' through `z' -were contigous. (On an EBCDIC system, the range `[a-z]' includes +were contiguous. (On an EBCDIC system, the range `[a-z]' includes additional, non-alphabetic characters as well.) Almost all introductory Unix literature explained range expressions as working in this fashion, and in particular, would teach that the "correct" way to match lowercase letters was with `[a-z]', and that -`[A-Z]' was the the "correct" way to match uppercase letters. And -indeed, this was true. +`[A-Z]' was the "correct" way to match uppercase letters. And indeed, +this was true. The 1993 POSIX standard introduced the idea of locales (*note Locales::). Since many locales include other letters besides the plain @@ -27624,225 +27624,225 @@ Node: Assigning Elements413593 Node: Array Example414084 Node: Scanning an Array415816 Node: Controlling Scanning418130 -Ref: Controlling Scanning-Footnote-1423062 -Node: Delete423378 -Ref: Delete-Footnote-1425813 -Node: Numeric Array Subscripts425870 -Node: Uninitialized Subscripts428053 -Node: Multi-dimensional429681 -Node: Multi-scanning432775 -Node: Arrays of Arrays434366 -Node: Functions439011 -Node: Built-in439833 -Node: Calling Built-in440911 -Node: Numeric Functions442899 -Ref: Numeric Functions-Footnote-1446664 -Ref: Numeric Functions-Footnote-2447021 -Ref: Numeric Functions-Footnote-3447069 -Node: String Functions447338 -Ref: String Functions-Footnote-1470835 -Ref: String Functions-Footnote-2470964 -Ref: String Functions-Footnote-3471212 -Node: Gory Details471299 -Ref: table-sub-escapes472978 -Ref: table-sub-posix-92474332 -Ref: table-sub-proposed475675 -Ref: table-posix-sub477025 -Ref: table-gensub-escapes478571 -Ref: Gory Details-Footnote-1479778 -Ref: Gory Details-Footnote-2479829 -Node: I/O Functions479980 -Ref: I/O Functions-Footnote-1486635 -Node: Time Functions486782 -Ref: Time Functions-Footnote-1497674 -Ref: Time Functions-Footnote-2497742 -Ref: Time Functions-Footnote-3497900 -Ref: Time Functions-Footnote-4498011 -Ref: Time Functions-Footnote-5498123 -Ref: Time Functions-Footnote-6498350 -Node: Bitwise Functions498616 -Ref: table-bitwise-ops499174 -Ref: Bitwise Functions-Footnote-1503334 -Node: Type Functions503518 -Node: I18N Functions503988 -Node: User-defined505615 -Node: Definition Syntax506419 -Ref: Definition Syntax-Footnote-1511329 -Node: Function Example511398 -Node: Function Caveats513992 -Node: Calling A Function514413 -Node: Variable Scope515528 -Node: Pass By Value/Reference517503 -Node: Return Statement520943 -Node: Dynamic Typing523924 -Node: Indirect Calls524659 -Node: Internationalization534344 -Node: I18N and L10N535770 -Node: Explaining gettext536456 -Ref: Explaining gettext-Footnote-1541522 -Ref: Explaining gettext-Footnote-2541706 -Node: Programmer i18n541871 -Node: Translator i18n546071 -Node: String Extraction546864 -Ref: String Extraction-Footnote-1547825 -Node: Printf Ordering547911 -Ref: Printf Ordering-Footnote-1550695 -Node: I18N Portability550759 -Ref: I18N Portability-Footnote-1553208 -Node: I18N Example553271 -Ref: I18N Example-Footnote-1555906 -Node: Gawk I18N555978 -Node: Advanced Features556595 -Node: Nondecimal Data558108 -Node: Array Sorting559691 -Node: Controlling Array Traversal560388 -Node: Array Sorting Functions568625 -Ref: Array Sorting Functions-Footnote-1572299 -Ref: Array Sorting Functions-Footnote-2572392 -Node: Two-way I/O572586 -Ref: Two-way I/O-Footnote-1578018 -Node: TCP/IP Networking578088 -Node: Profiling580932 -Node: Library Functions588406 -Ref: Library Functions-Footnote-1591413 -Node: Library Names591584 -Ref: Library Names-Footnote-1595055 -Ref: Library Names-Footnote-2595275 -Node: General Functions595361 -Node: Strtonum Function596314 -Node: Assert Function599244 -Node: Round Function602570 -Node: Cliff Random Function604113 -Node: Ordinal Functions605129 -Ref: Ordinal Functions-Footnote-1608199 -Ref: Ordinal Functions-Footnote-2608451 -Node: Join Function608660 -Ref: Join Function-Footnote-1610431 -Node: Gettimeofday Function610631 -Node: Data File Management614346 -Node: Filetrans Function614978 -Node: Rewind Function619117 -Node: File Checking620504 -Node: Empty Files621598 -Node: Ignoring Assigns623828 -Node: Getopt Function625381 -Ref: Getopt Function-Footnote-1636685 -Node: Passwd Functions636888 -Ref: Passwd Functions-Footnote-1645863 -Node: Group Functions645951 -Node: Walking Arrays654035 -Node: Sample Programs655604 -Node: Running Examples656269 -Node: Clones656997 -Node: Cut Program658221 -Node: Egrep Program668066 -Ref: Egrep Program-Footnote-1675839 -Node: Id Program675949 -Node: Split Program679565 -Ref: Split Program-Footnote-1683084 -Node: Tee Program683212 -Node: Uniq Program686015 -Node: Wc Program693444 -Ref: Wc Program-Footnote-1697710 -Ref: Wc Program-Footnote-2697910 -Node: Miscellaneous Programs698002 -Node: Dupword Program699190 -Node: Alarm Program701221 -Node: Translate Program705970 -Ref: Translate Program-Footnote-1710357 -Ref: Translate Program-Footnote-2710585 -Node: Labels Program710719 -Ref: Labels Program-Footnote-1714090 -Node: Word Sorting714174 -Node: History Sorting718058 -Node: Extract Program719897 -Ref: Extract Program-Footnote-1727380 -Node: Simple Sed727508 -Node: Igawk Program730570 -Ref: Igawk Program-Footnote-1745727 -Ref: Igawk Program-Footnote-2745928 -Node: Anagram Program746066 -Node: Signature Program749134 -Node: Debugger750234 -Node: Debugging751145 -Node: Debugging Concepts751558 -Node: Debugging Terms753414 -Node: Awk Debugging756037 -Node: Sample dgawk session756929 -Node: dgawk invocation757421 -Node: Finding The Bug758603 -Node: List of Debugger Commands765089 -Node: Breakpoint Control766400 -Node: Dgawk Execution Control770036 -Node: Viewing And Changing Data773387 -Node: Dgawk Stack776724 -Node: Dgawk Info778184 -Node: Miscellaneous Dgawk Commands782132 -Node: Readline Support787560 -Node: Dgawk Limitations788398 -Node: Language History790587 -Node: V7/SVR3.1792099 -Node: SVR4794420 -Node: POSIX795862 -Node: BTL796870 -Node: POSIX/GNU797604 -Node: Common Extensions802755 -Node: Ranges and Locales803862 -Ref: Ranges and Locales-Footnote-1808469 -Node: Contributors808690 -Node: Installation812952 -Node: Gawk Distribution813846 -Node: Getting814330 -Node: Extracting815156 -Node: Distribution contents816848 -Node: Unix Installation822070 -Node: Quick Installation822687 -Node: Additional Configuration Options824649 -Node: Configuration Philosophy826126 -Node: Non-Unix Installation828468 -Node: PC Installation828926 -Node: PC Binary Installation830225 -Node: PC Compiling832073 -Node: PC Testing835017 -Node: PC Using836193 -Node: Cygwin840378 -Node: MSYS841378 -Node: VMS Installation841892 -Node: VMS Compilation842495 -Ref: VMS Compilation-Footnote-1843502 -Node: VMS Installation Details843560 -Node: VMS Running845195 -Node: VMS Old Gawk846802 -Node: Bugs847276 -Node: Other Versions851128 -Node: Notes856409 -Node: Compatibility Mode857101 -Node: Additions857884 -Node: Accessing The Source858696 -Node: Adding Code860121 -Node: New Ports866088 -Node: Dynamic Extensions870201 -Node: Internals871577 -Node: Plugin License880680 -Node: Sample Library881314 -Node: Internal File Description882000 -Node: Internal File Ops885715 -Ref: Internal File Ops-Footnote-1890496 -Node: Using Internal File Ops890636 -Node: Future Extensions893013 -Node: Basic Concepts895517 -Node: Basic High Level896274 -Ref: Basic High Level-Footnote-1900309 -Node: Basic Data Typing900494 -Node: Floating Point Issues905019 -Node: String Conversion Precision906102 -Ref: String Conversion Precision-Footnote-1907802 -Node: Unexpected Results907911 -Node: POSIX Floating Point Problems909737 -Ref: POSIX Floating Point Problems-Footnote-1913442 -Node: Glossary913480 -Node: Copying938456 -Node: GNU Free Documentation License976013 -Node: Index1001150 +Ref: Controlling Scanning-Footnote-1423063 +Node: Delete423379 +Ref: Delete-Footnote-1425814 +Node: Numeric Array Subscripts425871 +Node: Uninitialized Subscripts428054 +Node: Multi-dimensional429682 +Node: Multi-scanning432776 +Node: Arrays of Arrays434367 +Node: Functions439012 +Node: Built-in439834 +Node: Calling Built-in440912 +Node: Numeric Functions442900 +Ref: Numeric Functions-Footnote-1446665 +Ref: Numeric Functions-Footnote-2447022 +Ref: Numeric Functions-Footnote-3447070 +Node: String Functions447339 +Ref: String Functions-Footnote-1470836 +Ref: String Functions-Footnote-2470965 +Ref: String Functions-Footnote-3471213 +Node: Gory Details471300 +Ref: table-sub-escapes472979 +Ref: table-sub-posix-92474333 +Ref: table-sub-proposed475676 +Ref: table-posix-sub477026 +Ref: table-gensub-escapes478572 +Ref: Gory Details-Footnote-1479779 +Ref: Gory Details-Footnote-2479830 +Node: I/O Functions479981 +Ref: I/O Functions-Footnote-1486636 +Node: Time Functions486783 +Ref: Time Functions-Footnote-1497675 +Ref: Time Functions-Footnote-2497743 +Ref: Time Functions-Footnote-3497901 +Ref: Time Functions-Footnote-4498012 +Ref: Time Functions-Footnote-5498124 +Ref: Time Functions-Footnote-6498351 +Node: Bitwise Functions498617 +Ref: table-bitwise-ops499175 +Ref: Bitwise Functions-Footnote-1503335 +Node: Type Functions503519 +Node: I18N Functions503989 +Node: User-defined505616 +Node: Definition Syntax506420 +Ref: Definition Syntax-Footnote-1511330 +Node: Function Example511399 +Node: Function Caveats513993 +Node: Calling A Function514414 +Node: Variable Scope515529 +Node: Pass By Value/Reference517504 +Node: Return Statement520944 +Node: Dynamic Typing523925 +Node: Indirect Calls524660 +Node: Internationalization534345 +Node: I18N and L10N535771 +Node: Explaining gettext536457 +Ref: Explaining gettext-Footnote-1541523 +Ref: Explaining gettext-Footnote-2541707 +Node: Programmer i18n541872 +Node: Translator i18n546072 +Node: String Extraction546865 +Ref: String Extraction-Footnote-1547826 +Node: Printf Ordering547912 +Ref: Printf Ordering-Footnote-1550696 +Node: I18N Portability550760 +Ref: I18N Portability-Footnote-1553209 +Node: I18N Example553272 +Ref: I18N Example-Footnote-1555907 +Node: Gawk I18N555979 +Node: Advanced Features556596 +Node: Nondecimal Data558109 +Node: Array Sorting559692 +Node: Controlling Array Traversal560389 +Node: Array Sorting Functions568626 +Ref: Array Sorting Functions-Footnote-1572300 +Ref: Array Sorting Functions-Footnote-2572393 +Node: Two-way I/O572587 +Ref: Two-way I/O-Footnote-1578019 +Node: TCP/IP Networking578089 +Node: Profiling580933 +Node: Library Functions588407 +Ref: Library Functions-Footnote-1591414 +Node: Library Names591585 +Ref: Library Names-Footnote-1595056 +Ref: Library Names-Footnote-2595276 +Node: General Functions595362 +Node: Strtonum Function596315 +Node: Assert Function599245 +Node: Round Function602571 +Node: Cliff Random Function604114 +Node: Ordinal Functions605130 +Ref: Ordinal Functions-Footnote-1608200 +Ref: Ordinal Functions-Footnote-2608452 +Node: Join Function608661 +Ref: Join Function-Footnote-1610432 +Node: Gettimeofday Function610632 +Node: Data File Management614347 +Node: Filetrans Function614979 +Node: Rewind Function619118 +Node: File Checking620505 +Node: Empty Files621599 +Node: Ignoring Assigns623829 +Node: Getopt Function625382 +Ref: Getopt Function-Footnote-1636686 +Node: Passwd Functions636889 +Ref: Passwd Functions-Footnote-1645864 +Node: Group Functions645952 +Node: Walking Arrays654036 +Node: Sample Programs655605 +Node: Running Examples656270 +Node: Clones656998 +Node: Cut Program658222 +Node: Egrep Program668067 +Ref: Egrep Program-Footnote-1675840 +Node: Id Program675950 +Node: Split Program679566 +Ref: Split Program-Footnote-1683085 +Node: Tee Program683213 +Node: Uniq Program686016 +Node: Wc Program693445 +Ref: Wc Program-Footnote-1697711 +Ref: Wc Program-Footnote-2697911 +Node: Miscellaneous Programs698003 +Node: Dupword Program699191 +Node: Alarm Program701222 +Node: Translate Program705971 +Ref: Translate Program-Footnote-1710358 +Ref: Translate Program-Footnote-2710586 +Node: Labels Program710720 +Ref: Labels Program-Footnote-1714091 +Node: Word Sorting714175 +Node: History Sorting718059 +Node: Extract Program719898 +Ref: Extract Program-Footnote-1727381 +Node: Simple Sed727509 +Node: Igawk Program730571 +Ref: Igawk Program-Footnote-1745728 +Ref: Igawk Program-Footnote-2745929 +Node: Anagram Program746067 +Node: Signature Program749135 +Node: Debugger750235 +Node: Debugging751146 +Node: Debugging Concepts751559 +Node: Debugging Terms753415 +Node: Awk Debugging756038 +Node: Sample dgawk session756930 +Node: dgawk invocation757422 +Node: Finding The Bug758604 +Node: List of Debugger Commands765090 +Node: Breakpoint Control766401 +Node: Dgawk Execution Control770037 +Node: Viewing And Changing Data773388 +Node: Dgawk Stack776725 +Node: Dgawk Info778185 +Node: Miscellaneous Dgawk Commands782133 +Node: Readline Support787561 +Node: Dgawk Limitations788399 +Node: Language History790588 +Node: V7/SVR3.1792100 +Node: SVR4794421 +Node: POSIX795863 +Node: BTL796871 +Node: POSIX/GNU797605 +Node: Common Extensions802756 +Node: Ranges and Locales803863 +Ref: Ranges and Locales-Footnote-1808467 +Node: Contributors808688 +Node: Installation812950 +Node: Gawk Distribution813844 +Node: Getting814328 +Node: Extracting815154 +Node: Distribution contents816846 +Node: Unix Installation822068 +Node: Quick Installation822685 +Node: Additional Configuration Options824647 +Node: Configuration Philosophy826124 +Node: Non-Unix Installation828466 +Node: PC Installation828924 +Node: PC Binary Installation830223 +Node: PC Compiling832071 +Node: PC Testing835015 +Node: PC Using836191 +Node: Cygwin840376 +Node: MSYS841376 +Node: VMS Installation841890 +Node: VMS Compilation842493 +Ref: VMS Compilation-Footnote-1843500 +Node: VMS Installation Details843558 +Node: VMS Running845193 +Node: VMS Old Gawk846800 +Node: Bugs847274 +Node: Other Versions851126 +Node: Notes856407 +Node: Compatibility Mode857099 +Node: Additions857882 +Node: Accessing The Source858694 +Node: Adding Code860119 +Node: New Ports866086 +Node: Dynamic Extensions870199 +Node: Internals871575 +Node: Plugin License880678 +Node: Sample Library881312 +Node: Internal File Description881998 +Node: Internal File Ops885713 +Ref: Internal File Ops-Footnote-1890494 +Node: Using Internal File Ops890634 +Node: Future Extensions893011 +Node: Basic Concepts895515 +Node: Basic High Level896272 +Ref: Basic High Level-Footnote-1900307 +Node: Basic Data Typing900492 +Node: Floating Point Issues905017 +Node: String Conversion Precision906100 +Ref: String Conversion Precision-Footnote-1907800 +Node: Unexpected Results907909 +Node: POSIX Floating Point Problems909735 +Ref: POSIX Floating Point Problems-Footnote-1913440 +Node: Glossary913478 +Node: Copying938454 +Node: GNU Free Documentation License976011 +Node: Index1001148  End Tag Table -- cgit v1.2.3