diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2014-06-08 22:57:54 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2014-06-08 22:57:54 +0300 |
commit | 4bf0a8ccb72ea56ae4e7f576dd1902603b521e8d (patch) | |
tree | e065fbc142f6e9cd414c9a26dd75b3b8c734c693 | |
parent | 55390bf583f7a3629a4c63de436702fa1b8b613b (diff) | |
download | egawk-4bf0a8ccb72ea56ae4e7f576dd1902603b521e8d.tar.gz egawk-4bf0a8ccb72ea56ae4e7f576dd1902603b521e8d.tar.bz2 egawk-4bf0a8ccb72ea56ae4e7f576dd1902603b521e8d.zip |
Start adding summary sections.
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/gawk.info | 1204 | ||||
-rw-r--r-- | doc/gawk.texi | 163 | ||||
-rw-r--r-- | doc/gawktexi.in | 163 |
4 files changed, 964 insertions, 570 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index b004023b..0ad1a947 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2014-06-08 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Start adding "Summary" sections. + 2014-06-03 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Restore macros for file name vs. filename etc. diff --git a/doc/gawk.info b/doc/gawk.info index c5038115..50ccda25 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -126,8 +126,8 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) includes command-line syntax. * One-shot:: Running a short throwaway `awk' program. -* Read Terminal:: Using no input files (input from - the keyboard instead). +* Read Terminal:: Using no input files (input from the + keyboard instead). * Long:: Putting permanent `awk' programs in files. * Executable Scripts:: Making self-contained `awk' @@ -149,6 +149,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Other Features:: Other Features of `awk'. * When:: When to use `gawk' and when to use other things. +* Intro Summary:: Summary of the introduction. * Command Line:: How to run `awk'. * Options:: Command-line options and their meanings. @@ -170,6 +171,7 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. * Regexp Usage:: How to Use Regular Expressions. * Escape Sequences:: How to write nonprinting characters. * Regexp Operators:: Regular Expression Operators. @@ -178,8 +180,12 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. * Records:: Controlling how data is split into records. +* awk split records:: How standard `awk' splits + records. +* gawk split records:: How `gawk' splits records. * Fields:: An introduction to fields. * Nonconstant Fields:: Nonconstant Field Numbers. * Changing Fields:: Changing the Contents of a Field. @@ -636,8 +642,8 @@ texts being (a) (see below), and with the Back-Cover Texts being (b) `gawk'. * New Ports:: Porting `gawk' to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the @@ -1351,6 +1357,7 @@ like this: * Other Features:: Other Features of `awk'. * When:: When to use `gawk' and when to use other things. +* Intro Summary:: Summary of the introduction. File: gawk.info, Node: Running gawk, Next: Sample Data Files, Up: Getting Started @@ -2194,7 +2201,7 @@ most of the variables and many of the functions. They are described systematically in *note Built-in Variables::, and *note Built-in::. -File: gawk.info, Node: When, Prev: Other Features, Up: Getting Started +File: gawk.info, Node: When, Next: Intro Summary, Prev: Other Features, Up: Getting Started 1.8 When to Use `awk' ===================== @@ -2235,6 +2242,30 @@ languages may require more lines of source code than the equivalent efficiently. +File: gawk.info, Node: Intro Summary, Prev: When, Up: Getting Started + +1.9 Summary +=========== + + * Programs in `awk' consist of PATTERN-ACTION pairs. + + * Use either `awk 'PROGRAM' FILES' or `awk -f PROGRAM-FILE FILES' to + run `awk'. + + * You may use the special `#!' header line to create `awk' programs + that are directly executable. + + * Comments in `awk' programs start with `#' and continue to the end + of the same line. + + * Be aware of quoting issues when writing `awk' programs as part of + a larger shell script (or MS-Windows batch file). + + * You may use backslash continuation to continue a source line. + Lines are automatically continued after a comma, open brace, + question mark, colon, `||', `&&', `do' and `else'. + + File: gawk.info, Node: Invoking Gawk, Next: Regexp, Prev: Getting Started, Up: Top 2 Running `awk' and `gawk' @@ -2264,6 +2295,7 @@ this major node that don't interest you right now. * Loading Shared Libraries:: Loading shared libraries into your program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. File: gawk.info, Node: Command Line, Next: Options, Up: Invoking Gawk @@ -3094,7 +3126,7 @@ worked. As of version 4.0, they are no longer interpreted specially by `gawk'. (Use `PROCINFO' instead; see *note Auto-set::.) -File: gawk.info, Node: Undocumented, Prev: Obsolete, Up: Invoking Gawk +File: gawk.info, Node: Undocumented, Next: Invoking Summary, Prev: Obsolete, Up: Invoking Gawk 2.10 Undocumented Options and Features ====================================== @@ -3104,6 +3136,48 @@ File: gawk.info, Node: Undocumented, Prev: Obsolete, Up: Invoking Gawk This minor node intentionally left blank. +File: gawk.info, Node: Invoking Summary, Prev: Undocumented, Up: Invoking Gawk + +2.11 Summary +============ + + * Use either `awk 'PROGRAM' FILES' or `awk -f PROGRAM-FILE FILES' to + run `awk'. + + * The three standard `awk' options are `-f', `-F' and `-v'. `gawk' + supplies these and many others, as well as corresponding GNU-style + long options. + + * Non-option command-line arguments are usually treated as file + names, unless they have the form `VAR=VALUE', in which case they + are taken as variable assignments to be performed at that point in + processing the input. + + * All non-option command-line arguments, excluding the program text, + are placed in the `ARGV' array. Adjusting `ARGC' and `ARGV' + affects how `awk' processes input. + + * You can use a single minus sign (`-') to refer to standard input + on the command line. + + * `gawk' pays attention to a number of environment variables. + `AWKPATH', `AWKLIBPATH', and `POSIXLY_CORRECT' are the most + important ones. + + * `gawk''s exit status conveys information to the program that + invoked it. Use the `exit' statement from within an `awk' program + to set the exit status. + + * `gawk' allows you to include other `awk' source files into your + program using the `@include' statement and/or the `-i' and `-f' + command-line options. + + * `gawk' allows you to load additional functions written in C or C++ + using the `@load' statement and/or the `-l' option. (This + advanced feature is described later on in *note Dynamic + Extensions::.) + + File: gawk.info, Node: Regexp, Next: Reading Files, Prev: Invoking Gawk, Up: Top 3 Regular Expressions @@ -3132,6 +3206,7 @@ you specify more complicated classes of strings. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. File: gawk.info, Node: Regexp Usage, Next: Escape Sequences, Up: Regexp @@ -3811,7 +3886,7 @@ this principle is also important for regexp-based record and field splitting (*note Records::, and also *note Field Separators::). -File: gawk.info, Node: Computed Regexps, Prev: Leftmost Longest, Up: Regexp +File: gawk.info, Node: Computed Regexps, Next: Regexp Summary, Prev: Leftmost Longest, Up: Regexp 3.8 Using Dynamic Regexps ========================= @@ -3890,6 +3965,44 @@ inside a bracket expression for a dynamic regexp: often in practice, but it's worth noting for future reference. +File: gawk.info, Node: Regexp Summary, Prev: Computed Regexps, Up: Regexp + +3.9 Summary +=========== + + * Regular expressions describe sets of strings to be matched. In + `awk', regular expression constants are written enclosed between + slashes: `/'...`/'. + + * Regexp constants may be used by standalone in patterns and in + conditional expressions, or as part of matching expressions using + the `~' and `!~' operators. + + * Escape sequences let you represent non-printable characters and + also let you represent regexp metacharacters as literal characters + to be matched. + + * Regexp operators provide grouping, alternation and repetition. + + * Bracket expressions give you a shorthand for specifyings sets of + characters that can match at a particular point in a regexp. + Within bracket expressions, POSIX character classes let you specify + certain groups of characters in a locale-independent fashion. + + * `gawk''s `IGNORECASE' variable lets you control the case + sensitivity of regexp matching. In other `awk' versions, use + `tolower()' or `toupper()'. + + * Regular expressions match the leftmost longest text in the string + being matched. This matters for cases where you need to know the + extent of the match, such as for text substitution and when the + record separator is a regexp. + + * Matching expressions may use dynamic regexps; that is string values + treated as regular expressions. + + + File: gawk.info, Node: Reading Files, Next: Printing, Prev: Regexp, Up: Top 4 Reading Input Files @@ -3946,8 +4059,8 @@ is never automatically reset to zero. * Menu: -* awk split records:: How standard `awk' splits records. -* gawk split records:: How `gawk' splits records. +* awk split records:: How standard `awk' splits records. +* gawk split records:: How `gawk' splits records. File: gawk.info, Node: awk split records, Next: gawk split records, Up: Records @@ -8029,7 +8142,7 @@ has the value one if `x' contains `foo', such as `"Oh, what a fool am I!"'. The righthand operand of the `~' and `!~' operators may be either a -regexp constant (`/.../') or an ordinary expression. In the latter +regexp constant (`/'...`/') or an ordinary expression. In the latter case, the value of the expression as a string is used as a dynamic regexp (*note Regexp Usage::; also *note Computed Regexps::). @@ -27415,8 +27528,8 @@ as well as any considerations you should bear in mind. `gawk'. * New Ports:: Porting `gawk' to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. File: gawk.info, Node: Accessing The Source, Next: Adding Code, Up: Additions @@ -33218,537 +33331,540 @@ Index Tag Table: Node: Top1292 -Node: Foreword40830 -Node: Preface45175 -Ref: Preface-Footnote-148322 -Ref: Preface-Footnote-248429 -Node: History48661 -Node: Names51035 -Ref: Names-Footnote-152499 -Node: This Manual52572 -Ref: This Manual-Footnote-158351 -Node: Conventions58451 -Node: Manual History60607 -Ref: Manual History-Footnote-164046 -Ref: Manual History-Footnote-264087 -Node: How To Contribute64161 -Node: Acknowledgments65400 -Node: Getting Started69549 -Node: Running gawk71922 -Node: One-shot73112 -Node: Read Terminal74337 -Ref: Read Terminal-Footnote-175987 -Ref: Read Terminal-Footnote-276263 -Node: Long76434 -Node: Executable Scripts77782 -Ref: Executable Scripts-Footnote-179615 -Ref: Executable Scripts-Footnote-279717 -Node: Comments80250 -Node: Quoting82717 -Node: DOS Quoting88026 -Node: Sample Data Files88701 -Node: Very Simple91216 -Node: Two Rules95847 -Node: More Complex97742 -Ref: More Complex-Footnote-1100667 -Node: Statements/Lines100752 -Ref: Statements/Lines-Footnote-1105207 -Node: Other Features105472 -Node: When106400 -Node: Invoking Gawk108548 -Node: Command Line110011 -Node: Options110802 -Ref: Options-Footnote-1126586 -Node: Other Arguments126611 -Node: Naming Standard Input129252 -Node: Environment Variables130332 -Node: AWKPATH Variable130890 -Ref: AWKPATH Variable-Footnote-1133741 -Ref: AWKPATH Variable-Footnote-2133786 -Node: AWKLIBPATH Variable134046 -Node: Other Environment Variables134805 -Node: Exit Status138460 -Node: Include Files139135 -Node: Loading Shared Libraries142699 -Node: Obsolete144083 -Node: Undocumented144780 -Node: Regexp145022 -Node: Regexp Usage146411 -Node: Escape Sequences148444 -Node: Regexp Operators154111 -Ref: Regexp Operators-Footnote-1161591 -Ref: Regexp Operators-Footnote-2161738 -Node: Bracket Expressions161836 -Ref: table-char-classes163726 -Node: GNU Regexp Operators166249 -Node: Case-sensitivity169972 -Ref: Case-sensitivity-Footnote-1172864 -Ref: Case-sensitivity-Footnote-2173099 -Node: Leftmost Longest173207 -Node: Computed Regexps174408 -Node: Reading Files177757 -Node: Records179759 -Node: awk split records180494 -Node: gawk split records185352 -Ref: gawk split records-Footnote-1189873 -Node: Fields189910 -Ref: Fields-Footnote-1192874 -Node: Nonconstant Fields192960 -Ref: Nonconstant Fields-Footnote-1195190 -Node: Changing Fields195392 -Node: Field Separators201346 -Node: Default Field Splitting204048 -Node: Regexp Field Splitting205165 -Node: Single Character Fields208506 -Node: Command Line Field Separator209565 -Node: Full Line Fields212907 -Ref: Full Line Fields-Footnote-1213415 -Node: Field Splitting Summary213461 -Ref: Field Splitting Summary-Footnote-1216560 -Node: Constant Size216661 -Node: Splitting By Content221268 -Ref: Splitting By Content-Footnote-1225018 -Node: Multiple Line225058 -Ref: Multiple Line-Footnote-1230914 -Node: Getline231093 -Node: Plain Getline233309 -Node: Getline/Variable235404 -Node: Getline/File236551 -Node: Getline/Variable/File237927 -Ref: Getline/Variable/File-Footnote-1239526 -Node: Getline/Pipe239613 -Node: Getline/Variable/Pipe242312 -Node: Getline/Coprocess243419 -Node: Getline/Variable/Coprocess244671 -Node: Getline Notes245408 -Node: Getline Summary248212 -Ref: table-getline-variants248620 -Node: Read Timeout249532 -Ref: Read Timeout-Footnote-1253359 -Node: Command line directories253417 -Node: Printing254299 -Node: Print255923 -Node: Print Examples257264 -Node: Output Separators260043 -Node: OFMT262059 -Node: Printf263417 -Node: Basic Printf264323 -Node: Control Letters265862 -Node: Format Modifiers269716 -Node: Printf Examples275743 -Node: Redirection278450 -Node: Special Files285397 -Node: Special FD285913 -Ref: Special FD-Footnote-1289488 -Node: Special Network289562 -Node: Special Caveats290398 -Node: Close Files And Pipes291173 -Ref: Close Files And Pipes-Footnote-1298289 -Ref: Close Files And Pipes-Footnote-2298437 -Node: Expressions298587 -Node: Values299719 -Node: Constants300395 -Node: Scalar Constants301075 -Ref: Scalar Constants-Footnote-1301934 -Node: Nondecimal-numbers302184 -Node: Regexp Constants305184 -Node: Using Constant Regexps305659 -Node: Variables308729 -Node: Using Variables309384 -Node: Assignment Options311108 -Node: Conversion312975 -Ref: table-locale-affects318411 -Ref: Conversion-Footnote-1319035 -Node: All Operators319144 -Node: Arithmetic Ops319774 -Node: Concatenation322279 -Ref: Concatenation-Footnote-1325075 -Node: Assignment Ops325195 -Ref: table-assign-ops330178 -Node: Increment Ops331495 -Node: Truth Values and Conditions334933 -Node: Truth Values336016 -Node: Typing and Comparison337065 -Node: Variable Typing337858 -Ref: Variable Typing-Footnote-1341758 -Node: Comparison Operators341880 -Ref: table-relational-ops342290 -Node: POSIX String Comparison345838 -Ref: POSIX String Comparison-Footnote-1346922 -Node: Boolean Ops347060 -Ref: Boolean Ops-Footnote-1351130 -Node: Conditional Exp351221 -Node: Function Calls352948 -Node: Precedence356706 -Node: Locales360375 -Node: Patterns and Actions361978 -Node: Pattern Overview363032 -Node: Regexp Patterns364709 -Node: Expression Patterns365252 -Node: Ranges369033 -Node: BEGIN/END372139 -Node: Using BEGIN/END372901 -Ref: Using BEGIN/END-Footnote-1375637 -Node: I/O And BEGIN/END375743 -Node: BEGINFILE/ENDFILE378028 -Node: Empty380959 -Node: Using Shell Variables381276 -Node: Action Overview383559 -Node: Statements385886 -Node: If Statement387734 -Node: While Statement389232 -Node: Do Statement391276 -Node: For Statement392432 -Node: Switch Statement395584 -Node: Break Statement397687 -Node: Continue Statement399742 -Node: Next Statement401535 -Node: Nextfile Statement403925 -Node: Exit Statement406580 -Node: Built-in Variables408984 -Node: User-modified410080 -Ref: User-modified-Footnote-1417765 -Node: Auto-set417827 -Ref: Auto-set-Footnote-1430373 -Ref: Auto-set-Footnote-2430578 -Node: ARGC and ARGV430634 -Node: Arrays434473 -Node: Array Basics435971 -Node: Array Intro436797 -Ref: figure-array-elements438770 -Node: Reference to Elements441177 -Node: Assigning Elements443450 -Node: Array Example443941 -Node: Scanning an Array445673 -Node: Controlling Scanning448688 -Ref: Controlling Scanning-Footnote-1453861 -Node: Delete454177 -Ref: Delete-Footnote-1456942 -Node: Numeric Array Subscripts456999 -Node: Uninitialized Subscripts459182 -Node: Multidimensional460807 -Node: Multiscanning463900 -Node: Arrays of Arrays465489 -Node: Functions470129 -Node: Built-in470948 -Node: Calling Built-in472026 -Node: Numeric Functions474014 -Ref: Numeric Functions-Footnote-1477848 -Ref: Numeric Functions-Footnote-2478205 -Ref: Numeric Functions-Footnote-3478253 -Node: String Functions478522 -Ref: String Functions-Footnote-1501533 -Ref: String Functions-Footnote-2501662 -Ref: String Functions-Footnote-3501910 -Node: Gory Details501997 -Ref: table-sub-escapes503666 -Ref: table-sub-posix-92505020 -Ref: table-sub-proposed506371 -Ref: table-posix-sub507725 -Ref: table-gensub-escapes509270 -Ref: Gory Details-Footnote-1510446 -Ref: Gory Details-Footnote-2510497 -Node: I/O Functions510648 -Ref: I/O Functions-Footnote-1517771 -Node: Time Functions517918 -Ref: Time Functions-Footnote-1528382 -Ref: Time Functions-Footnote-2528450 -Ref: Time Functions-Footnote-3528608 -Ref: Time Functions-Footnote-4528719 -Ref: Time Functions-Footnote-5528831 -Ref: Time Functions-Footnote-6529058 -Node: Bitwise Functions529324 -Ref: table-bitwise-ops529886 -Ref: Bitwise Functions-Footnote-1534131 -Node: Type Functions534315 -Node: I18N Functions535457 -Node: User-defined537102 -Node: Definition Syntax537906 -Ref: Definition Syntax-Footnote-1542831 -Node: Function Example542900 -Ref: Function Example-Footnote-1545544 -Node: Function Caveats545566 -Node: Calling A Function546084 -Node: Variable Scope547039 -Node: Pass By Value/Reference550027 -Node: Return Statement553535 -Node: Dynamic Typing556519 -Node: Indirect Calls557448 -Node: Library Functions567135 -Ref: Library Functions-Footnote-1570648 -Ref: Library Functions-Footnote-2570791 -Node: Library Names570962 -Ref: Library Names-Footnote-1574435 -Ref: Library Names-Footnote-2574655 -Node: General Functions574741 -Node: Strtonum Function575769 -Node: Assert Function578699 -Node: Round Function582025 -Node: Cliff Random Function583566 -Node: Ordinal Functions584582 -Ref: Ordinal Functions-Footnote-1587659 -Ref: Ordinal Functions-Footnote-2587911 -Node: Join Function588122 -Ref: Join Function-Footnote-1589893 -Node: Getlocaltime Function590093 -Node: Readfile Function593829 -Node: Data File Management595668 -Node: Filetrans Function596300 -Node: Rewind Function600355 -Node: File Checking601742 -Ref: File Checking-Footnote-1602874 -Node: Empty Files603075 -Node: Ignoring Assigns605298 -Node: Getopt Function606829 -Ref: Getopt Function-Footnote-1618125 -Node: Passwd Functions618328 -Ref: Passwd Functions-Footnote-1627307 -Node: Group Functions627395 -Ref: Group Functions-Footnote-1635337 -Node: Walking Arrays635550 -Node: Sample Programs637686 -Node: Running Examples638360 -Node: Clones639088 -Node: Cut Program640312 -Node: Egrep Program650173 -Ref: Egrep Program-Footnote-1658102 -Node: Id Program658212 -Node: Split Program661876 -Ref: Split Program-Footnote-1665407 -Node: Tee Program665535 -Node: Uniq Program668342 -Node: Wc Program675772 -Ref: Wc Program-Footnote-1680040 -Ref: Wc Program-Footnote-2680240 -Node: Miscellaneous Programs680332 -Node: Dupword Program681520 -Node: Alarm Program683551 -Node: Translate Program688365 -Ref: Translate Program-Footnote-1692756 -Ref: Translate Program-Footnote-2693026 -Node: Labels Program693160 -Ref: Labels Program-Footnote-1696531 -Node: Word Sorting696615 -Node: History Sorting700658 -Node: Extract Program702494 -Ref: Extract Program-Footnote-1710069 -Node: Simple Sed710198 -Node: Igawk Program713260 -Ref: Igawk Program-Footnote-1728436 -Ref: Igawk Program-Footnote-2728637 -Node: Anagram Program728775 -Node: Signature Program731843 -Node: Advanced Features733090 -Node: Nondecimal Data734976 -Node: Array Sorting736553 -Node: Controlling Array Traversal737250 -Node: Array Sorting Functions745530 -Ref: Array Sorting Functions-Footnote-1749437 -Node: Two-way I/O749631 -Ref: Two-way I/O-Footnote-1755147 -Node: TCP/IP Networking755229 -Node: Profiling758073 -Node: Internationalization765581 -Node: I18N and L10N767006 -Node: Explaining gettext767692 -Ref: Explaining gettext-Footnote-1772832 -Ref: Explaining gettext-Footnote-2773016 -Node: Programmer i18n773181 -Node: Translator i18n777406 -Node: String Extraction778200 -Ref: String Extraction-Footnote-1779161 -Node: Printf Ordering779247 -Ref: Printf Ordering-Footnote-1782029 -Node: I18N Portability782093 -Ref: I18N Portability-Footnote-1784542 -Node: I18N Example784605 -Ref: I18N Example-Footnote-1787327 -Node: Gawk I18N787399 -Node: Debugger788012 -Node: Debugging788983 -Node: Debugging Concepts789424 -Node: Debugging Terms791280 -Node: Awk Debugging793877 -Node: Sample Debugging Session794769 -Node: Debugger Invocation795289 -Node: Finding The Bug796622 -Node: List of Debugger Commands803104 -Node: Breakpoint Control804436 -Node: Debugger Execution Control808100 -Node: Viewing And Changing Data811460 -Node: Execution Stack814818 -Node: Debugger Info816331 -Node: Miscellaneous Debugger Commands820325 -Node: Readline Support825509 -Node: Limitations826401 -Node: Arbitrary Precision Arithmetic828649 -Ref: Arbitrary Precision Arithmetic-Footnote-1830298 -Node: General Arithmetic830446 -Node: Floating Point Issues832166 -Node: String Conversion Precision833047 -Ref: String Conversion Precision-Footnote-1834752 -Node: Unexpected Results834861 -Node: POSIX Floating Point Problems837014 -Ref: POSIX Floating Point Problems-Footnote-1840835 -Node: Integer Programming840873 -Node: Floating-point Programming842684 -Ref: Floating-point Programming-Footnote-1849012 -Ref: Floating-point Programming-Footnote-2849282 -Node: Floating-point Representation849546 -Node: Floating-point Context850711 -Ref: table-ieee-formats851550 -Node: Rounding Mode852934 -Ref: table-rounding-modes853413 -Ref: Rounding Mode-Footnote-1856428 -Node: Gawk and MPFR856607 -Node: Arbitrary Precision Floats858016 -Ref: Arbitrary Precision Floats-Footnote-1860459 -Node: Setting Precision860780 -Ref: table-predefined-precision-strings861464 -Node: Setting Rounding Mode863609 -Ref: table-gawk-rounding-modes864013 -Node: Floating-point Constants865200 -Node: Changing Precision866652 -Ref: Changing Precision-Footnote-1868044 -Node: Exact Arithmetic868218 -Node: Arbitrary Precision Integers871352 -Ref: Arbitrary Precision Integers-Footnote-1874367 -Node: Dynamic Extensions874514 -Node: Extension Intro875972 -Node: Plugin License877237 -Node: Extension Mechanism Outline877922 -Ref: figure-load-extension878346 -Ref: figure-load-new-function879831 -Ref: figure-call-new-function880833 -Node: Extension API Description882817 -Node: Extension API Functions Introduction884267 -Node: General Data Types889133 -Ref: General Data Types-Footnote-1894826 -Node: Requesting Values895125 -Ref: table-value-types-returned895862 -Node: Memory Allocation Functions896820 -Ref: Memory Allocation Functions-Footnote-1899567 -Node: Constructor Functions899663 -Node: Registration Functions901421 -Node: Extension Functions902106 -Node: Exit Callback Functions904408 -Node: Extension Version String905658 -Node: Input Parsers906308 -Node: Output Wrappers916111 -Node: Two-way processors920627 -Node: Printing Messages922831 -Ref: Printing Messages-Footnote-1923908 -Node: Updating `ERRNO'924060 -Node: Accessing Parameters924799 -Node: Symbol Table Access926029 -Node: Symbol table by name926543 -Node: Symbol table by cookie928519 -Ref: Symbol table by cookie-Footnote-1932652 -Node: Cached values932715 -Ref: Cached values-Footnote-1936220 -Node: Array Manipulation936311 -Ref: Array Manipulation-Footnote-1937409 -Node: Array Data Types937448 -Ref: Array Data Types-Footnote-1940151 -Node: Array Functions940243 -Node: Flattening Arrays944117 -Node: Creating Arrays950969 -Node: Extension API Variables955700 -Node: Extension Versioning956336 -Node: Extension API Informational Variables958237 -Node: Extension API Boilerplate959323 -Node: Finding Extensions963127 -Node: Extension Example963687 -Node: Internal File Description964417 -Node: Internal File Ops968508 -Ref: Internal File Ops-Footnote-1980054 -Node: Using Internal File Ops980194 -Ref: Using Internal File Ops-Footnote-1982541 -Node: Extension Samples982809 -Node: Extension Sample File Functions984333 -Node: Extension Sample Fnmatch991901 -Node: Extension Sample Fork993368 -Node: Extension Sample Inplace994581 -Node: Extension Sample Ord996347 -Node: Extension Sample Readdir997183 -Ref: table-readdir-file-types998032 -Node: Extension Sample Revout998831 -Node: Extension Sample Rev2way999422 -Node: Extension Sample Read write array1000163 -Node: Extension Sample Readfile1002042 -Node: Extension Sample API Tests1003142 -Node: Extension Sample Time1003667 -Node: gawkextlib1004982 -Node: Language History1007769 -Node: V7/SVR3.11009363 -Node: SVR41011683 -Node: POSIX1013125 -Node: BTL1014511 -Node: POSIX/GNU1015245 -Node: Feature History1020844 -Node: Common Extensions1033956 -Node: Ranges and Locales1035268 -Ref: Ranges and Locales-Footnote-11039885 -Ref: Ranges and Locales-Footnote-21039912 -Ref: Ranges and Locales-Footnote-31040146 -Node: Contributors1040367 -Node: Installation1045805 -Node: Gawk Distribution1046699 -Node: Getting1047183 -Node: Extracting1048009 -Node: Distribution contents1049651 -Node: Unix Installation1055368 -Node: Quick Installation1055985 -Node: Additional Configuration Options1058427 -Node: Configuration Philosophy1060165 -Node: Non-Unix Installation1062516 -Node: PC Installation1062974 -Node: PC Binary Installation1064285 -Node: PC Compiling1066133 -Ref: PC Compiling-Footnote-11069132 -Node: PC Testing1069237 -Node: PC Using1070413 -Node: Cygwin1074571 -Node: MSYS1075380 -Node: VMS Installation1075894 -Node: VMS Compilation1076690 -Ref: VMS Compilation-Footnote-11077905 -Node: VMS Dynamic Extensions1077963 -Node: VMS Installation Details1079336 -Node: VMS Running1081582 -Node: VMS GNV1084416 -Node: VMS Old Gawk1085139 -Node: Bugs1085609 -Node: Other Versions1089613 -Node: Notes1095838 -Node: Compatibility Mode1096638 -Node: Additions1097420 -Node: Accessing The Source1098345 -Node: Adding Code1099781 -Node: New Ports1105959 -Node: Derived Files1110440 -Ref: Derived Files-Footnote-11115521 -Ref: Derived Files-Footnote-21115555 -Ref: Derived Files-Footnote-31116151 -Node: Future Extensions1116265 -Node: Implementation Limitations1116871 -Node: Extension Design1118119 -Node: Old Extension Problems1119273 -Ref: Old Extension Problems-Footnote-11120790 -Node: Extension New Mechanism Goals1120847 -Ref: Extension New Mechanism Goals-Footnote-11124208 -Node: Extension Other Design Decisions1124397 -Node: Extension Future Growth1126503 -Node: Old Extension Mechanism1127339 -Node: Basic Concepts1129079 -Node: Basic High Level1129760 -Ref: figure-general-flow1130032 -Ref: figure-process-flow1130631 -Ref: Basic High Level-Footnote-11133860 -Node: Basic Data Typing1134045 -Node: Glossary1137372 -Node: Copying1162524 -Node: GNU Free Documentation License1200080 -Node: Index1225216 +Node: Foreword41210 +Node: Preface45555 +Ref: Preface-Footnote-148702 +Ref: Preface-Footnote-248809 +Node: History49041 +Node: Names51415 +Ref: Names-Footnote-152879 +Node: This Manual52952 +Ref: This Manual-Footnote-158731 +Node: Conventions58831 +Node: Manual History60987 +Ref: Manual History-Footnote-164426 +Ref: Manual History-Footnote-264467 +Node: How To Contribute64541 +Node: Acknowledgments65780 +Node: Getting Started69929 +Node: Running gawk72363 +Node: One-shot73553 +Node: Read Terminal74778 +Ref: Read Terminal-Footnote-176428 +Ref: Read Terminal-Footnote-276704 +Node: Long76875 +Node: Executable Scripts78223 +Ref: Executable Scripts-Footnote-180056 +Ref: Executable Scripts-Footnote-280158 +Node: Comments80691 +Node: Quoting83158 +Node: DOS Quoting88467 +Node: Sample Data Files89142 +Node: Very Simple91657 +Node: Two Rules96288 +Node: More Complex98183 +Ref: More Complex-Footnote-1101108 +Node: Statements/Lines101193 +Ref: Statements/Lines-Footnote-1105648 +Node: Other Features105913 +Node: When106841 +Node: Intro Summary109011 +Node: Invoking Gawk109777 +Node: Command Line111292 +Node: Options112083 +Ref: Options-Footnote-1127867 +Node: Other Arguments127892 +Node: Naming Standard Input130533 +Node: Environment Variables131613 +Node: AWKPATH Variable132171 +Ref: AWKPATH Variable-Footnote-1135022 +Ref: AWKPATH Variable-Footnote-2135067 +Node: AWKLIBPATH Variable135327 +Node: Other Environment Variables136086 +Node: Exit Status139741 +Node: Include Files140416 +Node: Loading Shared Libraries143980 +Node: Obsolete145364 +Node: Undocumented146061 +Node: Invoking Summary146328 +Node: Regexp147908 +Node: Regexp Usage149358 +Node: Escape Sequences151391 +Node: Regexp Operators157058 +Ref: Regexp Operators-Footnote-1164538 +Ref: Regexp Operators-Footnote-2164685 +Node: Bracket Expressions164783 +Ref: table-char-classes166673 +Node: GNU Regexp Operators169196 +Node: Case-sensitivity172919 +Ref: Case-sensitivity-Footnote-1175811 +Ref: Case-sensitivity-Footnote-2176046 +Node: Leftmost Longest176154 +Node: Computed Regexps177355 +Node: Regexp Summary180727 +Node: Reading Files182199 +Node: Records184201 +Node: awk split records184944 +Node: gawk split records189802 +Ref: gawk split records-Footnote-1194323 +Node: Fields194360 +Ref: Fields-Footnote-1197324 +Node: Nonconstant Fields197410 +Ref: Nonconstant Fields-Footnote-1199640 +Node: Changing Fields199842 +Node: Field Separators205796 +Node: Default Field Splitting208498 +Node: Regexp Field Splitting209615 +Node: Single Character Fields212956 +Node: Command Line Field Separator214015 +Node: Full Line Fields217357 +Ref: Full Line Fields-Footnote-1217865 +Node: Field Splitting Summary217911 +Ref: Field Splitting Summary-Footnote-1221010 +Node: Constant Size221111 +Node: Splitting By Content225718 +Ref: Splitting By Content-Footnote-1229468 +Node: Multiple Line229508 +Ref: Multiple Line-Footnote-1235364 +Node: Getline235543 +Node: Plain Getline237759 +Node: Getline/Variable239854 +Node: Getline/File241001 +Node: Getline/Variable/File242377 +Ref: Getline/Variable/File-Footnote-1243976 +Node: Getline/Pipe244063 +Node: Getline/Variable/Pipe246762 +Node: Getline/Coprocess247869 +Node: Getline/Variable/Coprocess249121 +Node: Getline Notes249858 +Node: Getline Summary252662 +Ref: table-getline-variants253070 +Node: Read Timeout253982 +Ref: Read Timeout-Footnote-1257809 +Node: Command line directories257867 +Node: Printing258749 +Node: Print260373 +Node: Print Examples261714 +Node: Output Separators264493 +Node: OFMT266509 +Node: Printf267867 +Node: Basic Printf268773 +Node: Control Letters270312 +Node: Format Modifiers274166 +Node: Printf Examples280193 +Node: Redirection282900 +Node: Special Files289847 +Node: Special FD290363 +Ref: Special FD-Footnote-1293938 +Node: Special Network294012 +Node: Special Caveats294848 +Node: Close Files And Pipes295623 +Ref: Close Files And Pipes-Footnote-1302739 +Ref: Close Files And Pipes-Footnote-2302887 +Node: Expressions303037 +Node: Values304169 +Node: Constants304845 +Node: Scalar Constants305525 +Ref: Scalar Constants-Footnote-1306384 +Node: Nondecimal-numbers306634 +Node: Regexp Constants309634 +Node: Using Constant Regexps310109 +Node: Variables313179 +Node: Using Variables313834 +Node: Assignment Options315558 +Node: Conversion317425 +Ref: table-locale-affects322861 +Ref: Conversion-Footnote-1323485 +Node: All Operators323594 +Node: Arithmetic Ops324224 +Node: Concatenation326729 +Ref: Concatenation-Footnote-1329525 +Node: Assignment Ops329645 +Ref: table-assign-ops334628 +Node: Increment Ops335945 +Node: Truth Values and Conditions339383 +Node: Truth Values340466 +Node: Typing and Comparison341515 +Node: Variable Typing342308 +Ref: Variable Typing-Footnote-1346208 +Node: Comparison Operators346330 +Ref: table-relational-ops346740 +Node: POSIX String Comparison350290 +Ref: POSIX String Comparison-Footnote-1351374 +Node: Boolean Ops351512 +Ref: Boolean Ops-Footnote-1355582 +Node: Conditional Exp355673 +Node: Function Calls357400 +Node: Precedence361158 +Node: Locales364827 +Node: Patterns and Actions366430 +Node: Pattern Overview367484 +Node: Regexp Patterns369161 +Node: Expression Patterns369704 +Node: Ranges373485 +Node: BEGIN/END376591 +Node: Using BEGIN/END377353 +Ref: Using BEGIN/END-Footnote-1380089 +Node: I/O And BEGIN/END380195 +Node: BEGINFILE/ENDFILE382480 +Node: Empty385411 +Node: Using Shell Variables385728 +Node: Action Overview388011 +Node: Statements390338 +Node: If Statement392186 +Node: While Statement393684 +Node: Do Statement395728 +Node: For Statement396884 +Node: Switch Statement400036 +Node: Break Statement402139 +Node: Continue Statement404194 +Node: Next Statement405987 +Node: Nextfile Statement408377 +Node: Exit Statement411032 +Node: Built-in Variables413436 +Node: User-modified414532 +Ref: User-modified-Footnote-1422217 +Node: Auto-set422279 +Ref: Auto-set-Footnote-1434825 +Ref: Auto-set-Footnote-2435030 +Node: ARGC and ARGV435086 +Node: Arrays438925 +Node: Array Basics440423 +Node: Array Intro441249 +Ref: figure-array-elements443222 +Node: Reference to Elements445629 +Node: Assigning Elements447902 +Node: Array Example448393 +Node: Scanning an Array450125 +Node: Controlling Scanning453140 +Ref: Controlling Scanning-Footnote-1458313 +Node: Delete458629 +Ref: Delete-Footnote-1461394 +Node: Numeric Array Subscripts461451 +Node: Uninitialized Subscripts463634 +Node: Multidimensional465259 +Node: Multiscanning468352 +Node: Arrays of Arrays469941 +Node: Functions474581 +Node: Built-in475400 +Node: Calling Built-in476478 +Node: Numeric Functions478466 +Ref: Numeric Functions-Footnote-1482300 +Ref: Numeric Functions-Footnote-2482657 +Ref: Numeric Functions-Footnote-3482705 +Node: String Functions482974 +Ref: String Functions-Footnote-1505985 +Ref: String Functions-Footnote-2506114 +Ref: String Functions-Footnote-3506362 +Node: Gory Details506449 +Ref: table-sub-escapes508118 +Ref: table-sub-posix-92509472 +Ref: table-sub-proposed510823 +Ref: table-posix-sub512177 +Ref: table-gensub-escapes513722 +Ref: Gory Details-Footnote-1514898 +Ref: Gory Details-Footnote-2514949 +Node: I/O Functions515100 +Ref: I/O Functions-Footnote-1522223 +Node: Time Functions522370 +Ref: Time Functions-Footnote-1532834 +Ref: Time Functions-Footnote-2532902 +Ref: Time Functions-Footnote-3533060 +Ref: Time Functions-Footnote-4533171 +Ref: Time Functions-Footnote-5533283 +Ref: Time Functions-Footnote-6533510 +Node: Bitwise Functions533776 +Ref: table-bitwise-ops534338 +Ref: Bitwise Functions-Footnote-1538583 +Node: Type Functions538767 +Node: I18N Functions539909 +Node: User-defined541554 +Node: Definition Syntax542358 +Ref: Definition Syntax-Footnote-1547283 +Node: Function Example547352 +Ref: Function Example-Footnote-1549996 +Node: Function Caveats550018 +Node: Calling A Function550536 +Node: Variable Scope551491 +Node: Pass By Value/Reference554479 +Node: Return Statement557987 +Node: Dynamic Typing560971 +Node: Indirect Calls561900 +Node: Library Functions571587 +Ref: Library Functions-Footnote-1575100 +Ref: Library Functions-Footnote-2575243 +Node: Library Names575414 +Ref: Library Names-Footnote-1578887 +Ref: Library Names-Footnote-2579107 +Node: General Functions579193 +Node: Strtonum Function580221 +Node: Assert Function583151 +Node: Round Function586477 +Node: Cliff Random Function588018 +Node: Ordinal Functions589034 +Ref: Ordinal Functions-Footnote-1592111 +Ref: Ordinal Functions-Footnote-2592363 +Node: Join Function592574 +Ref: Join Function-Footnote-1594345 +Node: Getlocaltime Function594545 +Node: Readfile Function598281 +Node: Data File Management600120 +Node: Filetrans Function600752 +Node: Rewind Function604807 +Node: File Checking606194 +Ref: File Checking-Footnote-1607326 +Node: Empty Files607527 +Node: Ignoring Assigns609750 +Node: Getopt Function611281 +Ref: Getopt Function-Footnote-1622577 +Node: Passwd Functions622780 +Ref: Passwd Functions-Footnote-1631759 +Node: Group Functions631847 +Ref: Group Functions-Footnote-1639789 +Node: Walking Arrays640002 +Node: Sample Programs642138 +Node: Running Examples642812 +Node: Clones643540 +Node: Cut Program644764 +Node: Egrep Program654625 +Ref: Egrep Program-Footnote-1662554 +Node: Id Program662664 +Node: Split Program666328 +Ref: Split Program-Footnote-1669859 +Node: Tee Program669987 +Node: Uniq Program672794 +Node: Wc Program680224 +Ref: Wc Program-Footnote-1684492 +Ref: Wc Program-Footnote-2684692 +Node: Miscellaneous Programs684784 +Node: Dupword Program685972 +Node: Alarm Program688003 +Node: Translate Program692817 +Ref: Translate Program-Footnote-1697208 +Ref: Translate Program-Footnote-2697478 +Node: Labels Program697612 +Ref: Labels Program-Footnote-1700983 +Node: Word Sorting701067 +Node: History Sorting705110 +Node: Extract Program706946 +Ref: Extract Program-Footnote-1714521 +Node: Simple Sed714650 +Node: Igawk Program717712 +Ref: Igawk Program-Footnote-1732888 +Ref: Igawk Program-Footnote-2733089 +Node: Anagram Program733227 +Node: Signature Program736295 +Node: Advanced Features737542 +Node: Nondecimal Data739428 +Node: Array Sorting741005 +Node: Controlling Array Traversal741702 +Node: Array Sorting Functions749982 +Ref: Array Sorting Functions-Footnote-1753889 +Node: Two-way I/O754083 +Ref: Two-way I/O-Footnote-1759599 +Node: TCP/IP Networking759681 +Node: Profiling762525 +Node: Internationalization770033 +Node: I18N and L10N771458 +Node: Explaining gettext772144 +Ref: Explaining gettext-Footnote-1777284 +Ref: Explaining gettext-Footnote-2777468 +Node: Programmer i18n777633 +Node: Translator i18n781858 +Node: String Extraction782652 +Ref: String Extraction-Footnote-1783613 +Node: Printf Ordering783699 +Ref: Printf Ordering-Footnote-1786481 +Node: I18N Portability786545 +Ref: I18N Portability-Footnote-1788994 +Node: I18N Example789057 +Ref: I18N Example-Footnote-1791779 +Node: Gawk I18N791851 +Node: Debugger792464 +Node: Debugging793435 +Node: Debugging Concepts793876 +Node: Debugging Terms795732 +Node: Awk Debugging798329 +Node: Sample Debugging Session799221 +Node: Debugger Invocation799741 +Node: Finding The Bug801074 +Node: List of Debugger Commands807556 +Node: Breakpoint Control808888 +Node: Debugger Execution Control812552 +Node: Viewing And Changing Data815912 +Node: Execution Stack819270 +Node: Debugger Info820783 +Node: Miscellaneous Debugger Commands824777 +Node: Readline Support829961 +Node: Limitations830853 +Node: Arbitrary Precision Arithmetic833101 +Ref: Arbitrary Precision Arithmetic-Footnote-1834750 +Node: General Arithmetic834898 +Node: Floating Point Issues836618 +Node: String Conversion Precision837499 +Ref: String Conversion Precision-Footnote-1839204 +Node: Unexpected Results839313 +Node: POSIX Floating Point Problems841466 +Ref: POSIX Floating Point Problems-Footnote-1845287 +Node: Integer Programming845325 +Node: Floating-point Programming847136 +Ref: Floating-point Programming-Footnote-1853464 +Ref: Floating-point Programming-Footnote-2853734 +Node: Floating-point Representation853998 +Node: Floating-point Context855163 +Ref: table-ieee-formats856002 +Node: Rounding Mode857386 +Ref: table-rounding-modes857865 +Ref: Rounding Mode-Footnote-1860880 +Node: Gawk and MPFR861059 +Node: Arbitrary Precision Floats862468 +Ref: Arbitrary Precision Floats-Footnote-1864911 +Node: Setting Precision865232 +Ref: table-predefined-precision-strings865916 +Node: Setting Rounding Mode868061 +Ref: table-gawk-rounding-modes868465 +Node: Floating-point Constants869652 +Node: Changing Precision871104 +Ref: Changing Precision-Footnote-1872496 +Node: Exact Arithmetic872670 +Node: Arbitrary Precision Integers875804 +Ref: Arbitrary Precision Integers-Footnote-1878819 +Node: Dynamic Extensions878966 +Node: Extension Intro880424 +Node: Plugin License881689 +Node: Extension Mechanism Outline882374 +Ref: figure-load-extension882798 +Ref: figure-load-new-function884283 +Ref: figure-call-new-function885285 +Node: Extension API Description887269 +Node: Extension API Functions Introduction888719 +Node: General Data Types893585 +Ref: General Data Types-Footnote-1899278 +Node: Requesting Values899577 +Ref: table-value-types-returned900314 +Node: Memory Allocation Functions901272 +Ref: Memory Allocation Functions-Footnote-1904019 +Node: Constructor Functions904115 +Node: Registration Functions905873 +Node: Extension Functions906558 +Node: Exit Callback Functions908860 +Node: Extension Version String910110 +Node: Input Parsers910760 +Node: Output Wrappers920563 +Node: Two-way processors925079 +Node: Printing Messages927283 +Ref: Printing Messages-Footnote-1928360 +Node: Updating `ERRNO'928512 +Node: Accessing Parameters929251 +Node: Symbol Table Access930481 +Node: Symbol table by name930995 +Node: Symbol table by cookie932971 +Ref: Symbol table by cookie-Footnote-1937104 +Node: Cached values937167 +Ref: Cached values-Footnote-1940672 +Node: Array Manipulation940763 +Ref: Array Manipulation-Footnote-1941861 +Node: Array Data Types941900 +Ref: Array Data Types-Footnote-1944603 +Node: Array Functions944695 +Node: Flattening Arrays948569 +Node: Creating Arrays955421 +Node: Extension API Variables960152 +Node: Extension Versioning960788 +Node: Extension API Informational Variables962689 +Node: Extension API Boilerplate963775 +Node: Finding Extensions967579 +Node: Extension Example968139 +Node: Internal File Description968869 +Node: Internal File Ops972960 +Ref: Internal File Ops-Footnote-1984506 +Node: Using Internal File Ops984646 +Ref: Using Internal File Ops-Footnote-1986993 +Node: Extension Samples987261 +Node: Extension Sample File Functions988785 +Node: Extension Sample Fnmatch996353 +Node: Extension Sample Fork997820 +Node: Extension Sample Inplace999033 +Node: Extension Sample Ord1000799 +Node: Extension Sample Readdir1001635 +Ref: table-readdir-file-types1002484 +Node: Extension Sample Revout1003283 +Node: Extension Sample Rev2way1003874 +Node: Extension Sample Read write array1004615 +Node: Extension Sample Readfile1006494 +Node: Extension Sample API Tests1007594 +Node: Extension Sample Time1008119 +Node: gawkextlib1009434 +Node: Language History1012221 +Node: V7/SVR3.11013815 +Node: SVR41016135 +Node: POSIX1017577 +Node: BTL1018963 +Node: POSIX/GNU1019697 +Node: Feature History1025296 +Node: Common Extensions1038408 +Node: Ranges and Locales1039720 +Ref: Ranges and Locales-Footnote-11044337 +Ref: Ranges and Locales-Footnote-21044364 +Ref: Ranges and Locales-Footnote-31044598 +Node: Contributors1044819 +Node: Installation1050257 +Node: Gawk Distribution1051151 +Node: Getting1051635 +Node: Extracting1052461 +Node: Distribution contents1054103 +Node: Unix Installation1059820 +Node: Quick Installation1060437 +Node: Additional Configuration Options1062879 +Node: Configuration Philosophy1064617 +Node: Non-Unix Installation1066968 +Node: PC Installation1067426 +Node: PC Binary Installation1068737 +Node: PC Compiling1070585 +Ref: PC Compiling-Footnote-11073584 +Node: PC Testing1073689 +Node: PC Using1074865 +Node: Cygwin1079023 +Node: MSYS1079832 +Node: VMS Installation1080346 +Node: VMS Compilation1081142 +Ref: VMS Compilation-Footnote-11082357 +Node: VMS Dynamic Extensions1082415 +Node: VMS Installation Details1083788 +Node: VMS Running1086034 +Node: VMS GNV1088868 +Node: VMS Old Gawk1089591 +Node: Bugs1090061 +Node: Other Versions1094065 +Node: Notes1100290 +Node: Compatibility Mode1101090 +Node: Additions1101872 +Node: Accessing The Source1102797 +Node: Adding Code1104233 +Node: New Ports1110411 +Node: Derived Files1114892 +Ref: Derived Files-Footnote-11119973 +Ref: Derived Files-Footnote-21120007 +Ref: Derived Files-Footnote-31120603 +Node: Future Extensions1120717 +Node: Implementation Limitations1121323 +Node: Extension Design1122571 +Node: Old Extension Problems1123725 +Ref: Old Extension Problems-Footnote-11125242 +Node: Extension New Mechanism Goals1125299 +Ref: Extension New Mechanism Goals-Footnote-11128660 +Node: Extension Other Design Decisions1128849 +Node: Extension Future Growth1130955 +Node: Old Extension Mechanism1131791 +Node: Basic Concepts1133531 +Node: Basic High Level1134212 +Ref: figure-general-flow1134484 +Ref: figure-process-flow1135083 +Ref: Basic High Level-Footnote-11138312 +Node: Basic Data Typing1138497 +Node: Glossary1141824 +Node: Copying1166976 +Node: GNU Free Documentation License1204532 +Node: Index1229668 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 093c776b..7f85c13c 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -471,8 +471,8 @@ particular records in a file and perform operations upon them. includes command-line syntax. * One-shot:: Running a short throwaway @command{awk} program. -* Read Terminal:: Using no input files (input from - the keyboard instead). +* Read Terminal:: Using no input files (input from the + keyboard instead). * Long:: Putting permanent @command{awk} programs in files. * Executable Scripts:: Making self-contained @command{awk} @@ -494,6 +494,7 @@ particular records in a file and perform operations upon them. * Other Features:: Other Features of @command{awk}. * When:: When to use @command{gawk} and when to use other things. +* Intro Summary:: Summary of the introduction. * Command Line:: How to run @command{awk}. * Options:: Command-line options and their meanings. @@ -515,6 +516,7 @@ particular records in a file and perform operations upon them. program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. * Regexp Usage:: How to Use Regular Expressions. * Escape Sequences:: How to write nonprinting characters. * Regexp Operators:: Regular Expression Operators. @@ -523,8 +525,12 @@ particular records in a file and perform operations upon them. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. * Records:: Controlling how data is split into records. +* awk split records:: How standard @command{awk} splits + records. +* gawk split records:: How @command{gawk} splits records. * Fields:: An introduction to fields. * Nonconstant Fields:: Nonconstant Field Numbers. * Changing Fields:: Changing the Contents of a Field. @@ -981,8 +987,8 @@ particular records in a file and perform operations upon them. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the @@ -1300,9 +1306,6 @@ has been removed.) * Conventions:: Typographical Conventions. * Manual History:: Brief history of the GNU project and this @value{DOCUMENT}. -@ifset FOR_PRINT -* Staying current:: How to keep up. -@end ifset * How To Contribute:: Helping to save the world. * Acknowledgments:: Acknowledgments. @end menu @@ -1861,7 +1864,7 @@ find an error in this @value{DOCUMENT}, please report it! @xref{Bugs}, for information on submitting problem reports electronically. @ifset FOR_PRINT -@node Staying current +@c fakenode --- for prepinfo @unnumberedsec How to Stay Current It may be you have a version of @command{gawk} which is newer than the @@ -2178,6 +2181,7 @@ program looks like this: * Other Features:: Other Features of @command{awk}. * When:: When to use @command{gawk} and when to use other things. +* Intro Summary:: Summary of the introduction. @end menu @node Running gawk @@ -3369,6 +3373,39 @@ Programs in these languages may require more lines of source code than the equivalent @command{awk} programs, but they are easier to maintain and usually run more efficiently. +@node Intro Summary +@section Summary + +@itemize @value{BULLET} +@item +Programs in @command{awk} consist of @var{pattern}-@var{action} pairs. + +@item +Use either +@samp{awk '@var{program}' @var{files}} +or +@samp{awk -f @var{program-file} @var{files}} +to run @command{awk}. + +@item +You may use the special @samp{#!} header line to create @command{awk} +programs that are directly executable. + +@item +Comments in @command{awk} programs start with @samp{#} and continue to +the end of the same line. + +@item +Be aware of quoting issues when writing @command{awk} programs as +part of a larger shell script (or MS-Windows batch file). + +@item +You may use backslash continuation to continue a source line. +Lines are automatically continued after +a comma, open brace, question mark, colon, +@samp{||}, @samp{&&}, @code{do} and @code{else}. +@end itemize + @node Invoking Gawk @chapter Running @command{awk} and @command{gawk} @@ -3397,6 +3434,7 @@ things in this @value{CHAPTER} that don't interest you right now. * Loading Shared Libraries:: Loading shared libraries into your program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. @end menu @node Command Line @@ -4566,6 +4604,58 @@ long-undocumented ``feature'' of Unix @code{awk}. @end ignore +@node Invoking Summary +@section Summary + +@itemize @value{BULLET} +@item +Use either +@samp{awk '@var{program}' @var{files}} +or +@samp{awk -f @var{program-file} @var{files}} +to run @command{awk}. + +@item +The three standard @command{awk} options are @option{-f}, @option{-F} +and @option{-v}. @command{gawk} supplies these and many others, as well +as corresponding GNU-style long options. + +@item +Non-option command-line arguments are usually treated as @value{FN}s, +unless they have the form @samp{@var{var}=@var{value}}, in which case +they are taken as variable assignments to be performed at that point +in processing the input. + +@item +All non-option command-line arguments, excluding the program text, +are placed in the @code{ARGV} array. Adjusting @code{ARGC} and @code{ARGV} +affects how @command{awk} processes input. + +@item +You can use a single minus sign (@samp{-}) to refer to standard input +on the command line. + +@item +@command{gawk} pays attention to a number of environment variables. +@env{AWKPATH}, @env{AWKLIBPATH}, and @env{POSIXLY_CORRECT} are the +most important ones. + +@item +@command{gawk}'s exit status conveys information to the program +that invoked it. Use the @code{exit} statement from within +an @command{awk} program to set the exit status. + +@item +@command{gawk} allows you to include other @command{awk} source files into +your program using the @code{@@include} statement and/or the @option{-i} +and @option{-f} command-line options. + +@item +@command{gawk} allows you to load additional functions written in C +or C++ using the @code{@@load} statement and/or the @option{-l} option. +(This advanced feature is described later on in @ref{Dynamic Extensions}.) +@end itemize + @node Regexp @chapter Regular Expressions @cindex regexp @@ -4604,6 +4694,7 @@ regular expressions work, we present more complicated instances. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. @end menu @node Regexp Usage @@ -5841,6 +5932,52 @@ occur often in practice, but it's worth noting for future reference. @end ifnotdocbook @c ENDOFRANGE dregexp @c ENDOFRANGE regexpd + +@node Regexp Summary +@section Summary + +@itemize @value{BULLET} +@item +Regular expressions describe sets of strings to be matched. +In @command{awk}, regular expression constants are written enclosed +between slashes: @code{/}@dots{}@code{/}. + +@item +Regexp constants may be used by standalone in patterns and +in conditional expressions, or as part of matching expressions +using the @samp{~} and @samp{!~} operators. + +@item +Escape sequences let you represent non-printable characters and +also let you represent regexp metacharacters as literal characters +to be matched. + +@item +Regexp operators provide grouping, alternation and repetition. + +@item +Bracket expressions give you a shorthand for specifyings sets +of characters that can match at a particular point in a regexp. +Within bracket expressions, POSIX character classes let you specify +certain groups of characters in a locale-independent fashion. + +@item +@command{gawk}'s @code{IGNORECASE} variable lets you control the +case sensitivity of regexp matching. In other @command{awk} +versions, use @code{tolower()} or @code{toupper()}. + +@item +Regular expressions match the leftmost longest text in the string being +matched. This matters for cases where you need to know the extent of +the match, such as for text substitution and when the record separator +is a regexp. + +@item +Matching expressions may use dynamic regexps; that is string values +treated as regular expressions. + +@end itemize + @c ENDOFRANGE regexp @node Reading Files @@ -5913,8 +6050,8 @@ number of input records read so far from all @value{DF}s. It starts at zero, but is never automatically reset to zero. @menu -* awk split records:: How standard @command{awk} splits records. -* gawk split records:: How @command{gawk} splits records. +* awk split records:: How standard @command{awk} splits records. +* gawk split records:: How @command{gawk} splits records. @end menu @node awk split records @@ -11723,7 +11860,7 @@ has the value one if @code{x} contains @samp{foo}, such as @cindex @code{!} (exclamation point), @code{!~} operator @cindex exclamation point (@code{!}), @code{!~} operator The righthand operand of the @samp{~} and @samp{!~} operators may be -either a regexp constant (@code{/@dots{}/}) or an ordinary +either a regexp constant (@code{/}@dots{}@code{/}) or an ordinary expression. In the latter case, the value of the expression as a string is used as a dynamic regexp (@pxref{Regexp Usage}; also @pxref{Computed Regexps}). @@ -37286,8 +37423,8 @@ as well as any considerations you should bear in mind. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. @end menu @node Accessing The Source diff --git a/doc/gawktexi.in b/doc/gawktexi.in index b80a6849..e64382e6 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -466,8 +466,8 @@ particular records in a file and perform operations upon them. includes command-line syntax. * One-shot:: Running a short throwaway @command{awk} program. -* Read Terminal:: Using no input files (input from - the keyboard instead). +* Read Terminal:: Using no input files (input from the + keyboard instead). * Long:: Putting permanent @command{awk} programs in files. * Executable Scripts:: Making self-contained @command{awk} @@ -489,6 +489,7 @@ particular records in a file and perform operations upon them. * Other Features:: Other Features of @command{awk}. * When:: When to use @command{gawk} and when to use other things. +* Intro Summary:: Summary of the introduction. * Command Line:: How to run @command{awk}. * Options:: Command-line options and their meanings. @@ -510,6 +511,7 @@ particular records in a file and perform operations upon them. program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. * Regexp Usage:: How to Use Regular Expressions. * Escape Sequences:: How to write nonprinting characters. * Regexp Operators:: Regular Expression Operators. @@ -518,8 +520,12 @@ particular records in a file and perform operations upon them. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. * Records:: Controlling how data is split into records. +* awk split records:: How standard @command{awk} splits + records. +* gawk split records:: How @command{gawk} splits records. * Fields:: An introduction to fields. * Nonconstant Fields:: Nonconstant Field Numbers. * Changing Fields:: Changing the Contents of a Field. @@ -976,8 +982,8 @@ particular records in a file and perform operations upon them. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. * Future Extensions:: New features that may be implemented one day. * Implementation Limitations:: Some limitations of the @@ -1295,9 +1301,6 @@ has been removed.) * Conventions:: Typographical Conventions. * Manual History:: Brief history of the GNU project and this @value{DOCUMENT}. -@ifset FOR_PRINT -* Staying current:: How to keep up. -@end ifset * How To Contribute:: Helping to save the world. * Acknowledgments:: Acknowledgments. @end menu @@ -1828,7 +1831,7 @@ find an error in this @value{DOCUMENT}, please report it! @xref{Bugs}, for information on submitting problem reports electronically. @ifset FOR_PRINT -@node Staying current +@c fakenode --- for prepinfo @unnumberedsec How to Stay Current It may be you have a version of @command{gawk} which is newer than the @@ -2145,6 +2148,7 @@ program looks like this: * Other Features:: Other Features of @command{awk}. * When:: When to use @command{gawk} and when to use other things. +* Intro Summary:: Summary of the introduction. @end menu @node Running gawk @@ -3297,6 +3301,39 @@ Programs in these languages may require more lines of source code than the equivalent @command{awk} programs, but they are easier to maintain and usually run more efficiently. +@node Intro Summary +@section Summary + +@itemize @value{BULLET} +@item +Programs in @command{awk} consist of @var{pattern}-@var{action} pairs. + +@item +Use either +@samp{awk '@var{program}' @var{files}} +or +@samp{awk -f @var{program-file} @var{files}} +to run @command{awk}. + +@item +You may use the special @samp{#!} header line to create @command{awk} +programs that are directly executable. + +@item +Comments in @command{awk} programs start with @samp{#} and continue to +the end of the same line. + +@item +Be aware of quoting issues when writing @command{awk} programs as +part of a larger shell script (or MS-Windows batch file). + +@item +You may use backslash continuation to continue a source line. +Lines are automatically continued after +a comma, open brace, question mark, colon, +@samp{||}, @samp{&&}, @code{do} and @code{else}. +@end itemize + @node Invoking Gawk @chapter Running @command{awk} and @command{gawk} @@ -3325,6 +3362,7 @@ things in this @value{CHAPTER} that don't interest you right now. * Loading Shared Libraries:: Loading shared libraries into your program. * Obsolete:: Obsolete Options and/or features. * Undocumented:: Undocumented Options and Features. +* Invoking Summary:: Invocation summary. @end menu @node Command Line @@ -4494,6 +4532,58 @@ long-undocumented ``feature'' of Unix @code{awk}. @end ignore +@node Invoking Summary +@section Summary + +@itemize @value{BULLET} +@item +Use either +@samp{awk '@var{program}' @var{files}} +or +@samp{awk -f @var{program-file} @var{files}} +to run @command{awk}. + +@item +The three standard @command{awk} options are @option{-f}, @option{-F} +and @option{-v}. @command{gawk} supplies these and many others, as well +as corresponding GNU-style long options. + +@item +Non-option command-line arguments are usually treated as @value{FN}s, +unless they have the form @samp{@var{var}=@var{value}}, in which case +they are taken as variable assignments to be performed at that point +in processing the input. + +@item +All non-option command-line arguments, excluding the program text, +are placed in the @code{ARGV} array. Adjusting @code{ARGC} and @code{ARGV} +affects how @command{awk} processes input. + +@item +You can use a single minus sign (@samp{-}) to refer to standard input +on the command line. + +@item +@command{gawk} pays attention to a number of environment variables. +@env{AWKPATH}, @env{AWKLIBPATH}, and @env{POSIXLY_CORRECT} are the +most important ones. + +@item +@command{gawk}'s exit status conveys information to the program +that invoked it. Use the @code{exit} statement from within +an @command{awk} program to set the exit status. + +@item +@command{gawk} allows you to include other @command{awk} source files into +your program using the @code{@@include} statement and/or the @option{-i} +and @option{-f} command-line options. + +@item +@command{gawk} allows you to load additional functions written in C +or C++ using the @code{@@load} statement and/or the @option{-l} option. +(This advanced feature is described later on in @ref{Dynamic Extensions}.) +@end itemize + @node Regexp @chapter Regular Expressions @cindex regexp @@ -4532,6 +4622,7 @@ regular expressions work, we present more complicated instances. * Case-sensitivity:: How to do case-insensitive matching. * Leftmost Longest:: How much text matches. * Computed Regexps:: Using Dynamic Regexps. +* Regexp Summary:: Regular expressions summary. @end menu @node Regexp Usage @@ -5642,6 +5733,52 @@ occur often in practice, but it's worth noting for future reference. @end sidebar @c ENDOFRANGE dregexp @c ENDOFRANGE regexpd + +@node Regexp Summary +@section Summary + +@itemize @value{BULLET} +@item +Regular expressions describe sets of strings to be matched. +In @command{awk}, regular expression constants are written enclosed +between slashes: @code{/}@dots{}@code{/}. + +@item +Regexp constants may be used by standalone in patterns and +in conditional expressions, or as part of matching expressions +using the @samp{~} and @samp{!~} operators. + +@item +Escape sequences let you represent non-printable characters and +also let you represent regexp metacharacters as literal characters +to be matched. + +@item +Regexp operators provide grouping, alternation and repetition. + +@item +Bracket expressions give you a shorthand for specifyings sets +of characters that can match at a particular point in a regexp. +Within bracket expressions, POSIX character classes let you specify +certain groups of characters in a locale-independent fashion. + +@item +@command{gawk}'s @code{IGNORECASE} variable lets you control the +case sensitivity of regexp matching. In other @command{awk} +versions, use @code{tolower()} or @code{toupper()}. + +@item +Regular expressions match the leftmost longest text in the string being +matched. This matters for cases where you need to know the extent of +the match, such as for text substitution and when the record separator +is a regexp. + +@item +Matching expressions may use dynamic regexps; that is string values +treated as regular expressions. + +@end itemize + @c ENDOFRANGE regexp @node Reading Files @@ -5714,8 +5851,8 @@ number of input records read so far from all @value{DF}s. It starts at zero, but is never automatically reset to zero. @menu -* awk split records:: How standard @command{awk} splits records. -* gawk split records:: How @command{gawk} splits records. +* awk split records:: How standard @command{awk} splits records. +* gawk split records:: How @command{gawk} splits records. @end menu @node awk split records @@ -11103,7 +11240,7 @@ has the value one if @code{x} contains @samp{foo}, such as @cindex @code{!} (exclamation point), @code{!~} operator @cindex exclamation point (@code{!}), @code{!~} operator The righthand operand of the @samp{~} and @samp{!~} operators may be -either a regexp constant (@code{/@dots{}/}) or an ordinary +either a regexp constant (@code{/}@dots{}@code{/}) or an ordinary expression. In the latter case, the value of the expression as a string is used as a dynamic regexp (@pxref{Regexp Usage}; also @pxref{Computed Regexps}). @@ -36430,8 +36567,8 @@ as well as any considerations you should bear in mind. @command{gawk}. * New Ports:: Porting @command{gawk} to a new operating system. -* Derived Files:: Why derived files are kept in the - Git repository. +* Derived Files:: Why derived files are kept in the Git + repository. @end menu @node Accessing The Source |