diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-05-30 10:54:06 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-05-30 10:54:06 +0300 |
commit | 1963e23d0a9b13974f2e5a77fdea03d50dc9c654 (patch) | |
tree | 092f5af7aa3cacba8e3208de85d2ce2a9fe87713 | |
parent | c73879ace26ad81ee05db907001b7989d0b11af3 (diff) | |
download | gawk-1963e23d0a9b13974f2e5a77fdea03d50dc9c654.tar.gz |
Document PROCINFO["argv"].
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | doc/ChangeLog | 4 | ||||
-rw-r--r-- | doc/gawk.info | 806 | ||||
-rw-r--r-- | doc/gawk.texi | 44 | ||||
-rw-r--r-- | doc/gawktexi.in | 44 |
6 files changed, 475 insertions, 430 deletions
@@ -1,3 +1,7 @@ +2017-05-30 Arnold D. Robbins <arnold@skeeve.com> + + * NEWS: Mention PROCINFO["argv"]. + 2017-05-24 Andrew J. Schorr <aschorr@telemetry-investments.com> * field.c (set_FIELDWIDTHS): Add check to protect against blank @@ -115,6 +115,9 @@ Changes from 4.1.x to 4.2.0 parsing mechanism by specifying the locations of each field in the input record. When this is in effect, PROCINFO["FS"] will be set to "API". +28. The PROCINFO["argv"] array records all of gawk's command line arguments + as gawk received them (the values of the C level argv array). + Changes from 4.1.3 to 4.1.4 --------------------------- diff --git a/doc/ChangeLog b/doc/ChangeLog index e610a6e3..0a205066 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2017-05-30 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Document PROCINFO["argv"]. + 2017-05-29 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in (Checking for MPFR): New node on checking if diff --git a/doc/gawk.info b/doc/gawk.info index 2ed1c733..821660c5 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -10853,6 +10853,25 @@ they are not special: running 'awk' program. The following elements (listed alphabetically) are guaranteed to be available: + 'PROCINFO["argv"]' + The 'PROCINFO["argv"]' array contains all of the command-line + arguments (after glob expansion and redirection processing on + platforms where that must be done manually by the program) + with subscripts ranging from 0 through 'argc' - 1. For + example, 'PROCINFO["argv"][0]' will contain the name by which + 'gawk' was invoked. Here is an example of how this feature + may be used: + + gawk ' + BEGIN { + for (i = 0; i < length(PROCINFO["argv"]); i++) + print i, PROCINFO["argv"][i] + }' + + Please note that this differs from the standard 'ARGV' array + which does not include command-line arguments that have + already been processed by 'gawk' (*note ARGC and ARGV::). + 'PROCINFO["egid"]' The value of the 'getegid()' system call. @@ -28019,6 +28038,8 @@ POSIX 'awk', in the order they were added to 'gawk'. * Changes to 'ENVIRON' are reflected into 'gawk''s environment and that of programs that it runs. *Note Auto-set::. + * The 'PROCINFO["argv"' array. *Note Auto-set::. + * The '--pretty-print' option no longer runs the 'awk' program too. *Note Options::. @@ -33351,6 +33372,7 @@ Index * columns, cutting: Cut Program. (line 6) * comma (,), in range patterns: Ranges. (line 6) * command completion, in debugger: Readline Support. (line 6) +* command line arguments, PROCINFO["argv": Auto-set. (line 154) * command line, arguments: Other Arguments. (line 6) * command line, arguments <1>: Auto-set. (line 15) * command line, arguments <2>: ARGC and ARGV. (line 6) @@ -33491,7 +33513,7 @@ Index * dark corner, field separators: Full Line Fields. (line 22) * dark corner, FILENAME variable: Getline Notes. (line 19) * dark corner, FILENAME variable <1>: Auto-set. (line 108) -* dark corner, FNR/NR variables: Auto-set. (line 358) +* dark corner, FNR/NR variables: Auto-set. (line 377) * dark corner, format-control characters: Control Letters. (line 18) * dark corner, format-control characters <1>: Control Letters. (line 93) @@ -33726,7 +33748,7 @@ Index (line 6) * differences in awk and gawk, RS/RT variables: gawk split records. (line 58) -* differences in awk and gawk, RT variable: Auto-set. (line 296) +* differences in awk and gawk, RT variable: Auto-set. (line 315) * differences in awk and gawk, single-character fields: Single Character Fields. (line 6) * differences in awk and gawk, split() function: String Functions. @@ -33734,7 +33756,7 @@ Index * differences in awk and gawk, strings: Scalar Constants. (line 20) * differences in awk and gawk, strings, storing: gawk split records. (line 76) -* differences in awk and gawk, SYMTAB variable: Auto-set. (line 300) +* differences in awk and gawk, SYMTAB variable: Auto-set. (line 319) * differences in awk and gawk, TEXTDOMAIN variable: User-modified. (line 155) * differences in awk and gawk, trunc-mod operation: Arithmetic Ops. @@ -33774,8 +33796,8 @@ Index * dynamically loaded extensions: Dynamic Extensions. (line 6) * e debugger command (alias for enable): Breakpoint Control. (line 73) * EBCDIC: Ordinal Functions. (line 45) -* effective group ID of gawk user: Auto-set. (line 153) -* effective user ID of gawk user: Auto-set. (line 161) +* effective group ID of gawk user: Auto-set. (line 172) +* effective user ID of gawk user: Auto-set. (line 180) * egrep utility: Bracket Expressions. (line 34) * egrep utility <1>: Egrep Program. (line 6) * egrep.awk program: Egrep Program. (line 53) @@ -33897,7 +33919,7 @@ Index (line 6) * extension API version: Extension Versioning. (line 6) -* extension API, version number: Auto-set. (line 247) +* extension API, version number: Auto-set. (line 266) * extension example: Extension Example. (line 6) * extension registration: Registration Functions. (line 6) @@ -34049,7 +34071,7 @@ Index (line 12) * FNR variable: Records. (line 6) * FNR variable <1>: Auto-set. (line 118) -* FNR variable, changing: Auto-set. (line 358) +* FNR variable, changing: Auto-set. (line 377) * for statement: For Statement. (line 6) * for statement, looping over arrays: Scanning an Array. (line 20) * fork() extension function: Extension Sample Fork. @@ -34153,7 +34175,7 @@ Index * G., Daniel Richard <1>: Maintainers. (line 14) * Garfinkle, Scott: Contributors. (line 35) * gawk program, dynamic profiling: Profiling. (line 177) -* gawk version: Auto-set. (line 222) +* gawk version: Auto-set. (line 241) * gawk, ARGIND variable in: Other Arguments. (line 15) * gawk, awk and: Preface. (line 21) * gawk, awk and <1>: This Manual. (line 14) @@ -34229,13 +34251,13 @@ Index * gawk, regular expressions, precedence: Regexp Operators. (line 161) * gawk, RT variable in: awk split records. (line 124) * gawk, RT variable in <1>: Multiple Line. (line 130) -* gawk, RT variable in <2>: Auto-set. (line 296) +* gawk, RT variable in <2>: Auto-set. (line 315) * gawk, See Also awk: Preface. (line 34) * gawk, source code, obtaining: Getting. (line 6) * gawk, splitting fields and: Testing field creation. (line 6) * gawk, string-translation functions: I18N Functions. (line 6) -* gawk, SYMTAB array in: Auto-set. (line 300) +* gawk, SYMTAB array in: Auto-set. (line 319) * gawk, TEXTDOMAIN variable in: User-modified. (line 155) * gawk, timestamps: Time Functions. (line 6) * gawk, uses for: Preface. (line 34) @@ -34332,7 +34354,7 @@ Index * Grigera, Juan: Contributors. (line 58) * group database, reading: Group Functions. (line 6) * group file: Group Functions. (line 6) -* group ID of gawk user: Auto-set. (line 171) +* group ID of gawk user: Auto-set. (line 190) * groups, information about: Group Functions. (line 6) * gsub: Standard Regexp Constants. (line 43) @@ -34632,7 +34654,7 @@ Index * mawk utility <2>: Concatenation. (line 36) * mawk utility <3>: Nextfile Statement. (line 47) * mawk utility <4>: Other Versions. (line 48) -* maximum precision supported by MPFR library: Auto-set. (line 236) +* maximum precision supported by MPFR library: Auto-set. (line 255) * McIlroy, Doug: Glossary. (line 257) * McPhee, Patrick: Contributors. (line 101) * message object files: Explaining gettext. (line 42) @@ -34645,7 +34667,7 @@ Index * messages from extensions: Printing Messages. (line 6) * metacharacters in regular expressions: Regexp Operators. (line 6) * metacharacters, escape sequences for: Escape Sequences. (line 140) -* minimum precision required by MPFR library: Auto-set. (line 239) +* minimum precision required by MPFR library: Auto-set. (line 258) * mktime: Time Functions. (line 25) * modifiers, in format specifiers: Format Modifiers. (line 6) * monetary information, localization: Explaining gettext. (line 104) @@ -34704,7 +34726,7 @@ Index * not Boolean-logic operator: Boolean Ops. (line 6) * NR variable: Records. (line 6) * NR variable <1>: Auto-set. (line 143) -* NR variable, changing: Auto-set. (line 358) +* NR variable, changing: Auto-set. (line 377) * null strings: awk split records. (line 114) * null strings <1>: Regexp Field Splitting. (line 43) @@ -34824,7 +34846,7 @@ Index * p debugger command (alias for print): Viewing And Changing Data. (line 35) * Papadopoulos, Panos: Contributors. (line 129) -* parent process ID of gawk process: Auto-set. (line 211) +* parent process ID of gawk process: Auto-set. (line 230) * parentheses (), in a profile: Profiling. (line 146) * parentheses (), regexp operator: Regexp Operators. (line 81) * password file: Passwd Functions. (line 16) @@ -34993,8 +35015,8 @@ Index * printing, unduplicated lines of text: Uniq Program. (line 6) * printing, user information: Id Program. (line 6) * private variables: Library Names. (line 11) -* process group ID of gawk process: Auto-set. (line 205) -* process ID of gawk process: Auto-set. (line 208) +* process group ID of gawk process: Auto-set. (line 224) +* process ID of gawk process: Auto-set. (line 227) * processes, two-way communications with: Two-way I/O. (line 6) * processing data: Basic High Level. (line 6) * PROCINFO array: Auto-set. (line 148) @@ -35009,7 +35031,7 @@ Index (line 26) * profiling awk programs: Profiling. (line 6) * profiling awk programs, dynamically: Profiling. (line 177) -* program identifiers: Auto-set. (line 174) +* program identifiers: Auto-set. (line 193) * program, definition of: Getting Started. (line 21) * programming conventions, --non-decimal-data option: Nondecimal Data. (line 35) @@ -35170,7 +35192,7 @@ Index * right shift: Bitwise Functions. (line 54) * right shift, bitwise: Bitwise Functions. (line 32) * Ritchie, Dennis: Basic Data Typing. (line 54) -* RLENGTH variable: Auto-set. (line 283) +* RLENGTH variable: Auto-set. (line 302) * RLENGTH variable, match() function and: String Functions. (line 227) * Robbins, Arnold: Command Line Field Separator. (line 71) @@ -35196,11 +35218,11 @@ Index * RS variable <1>: User-modified. (line 136) * RS variable, multiline records and: Multiple Line. (line 17) * rshift: Bitwise Functions. (line 54) -* RSTART variable: Auto-set. (line 289) +* RSTART variable: Auto-set. (line 308) * RSTART variable, match() function and: String Functions. (line 227) * RT variable: awk split records. (line 124) * RT variable <1>: Multiple Line. (line 130) -* RT variable <2>: Auto-set. (line 296) +* RT variable <2>: Auto-set. (line 315) * Rubin, Paul: History. (line 30) * Rubin, Paul <1>: Contributors. (line 16) * rule, definition of: Getting Started. (line 21) @@ -35218,7 +35240,7 @@ Index * scanning arrays: Scanning an Array. (line 6) * scanning multidimensional arrays: Multiscanning. (line 11) * Schorr, Andrew: Acknowledgments. (line 60) -* Schorr, Andrew <1>: Auto-set. (line 328) +* Schorr, Andrew <1>: Auto-set. (line 347) * Schorr, Andrew <2>: Contributors. (line 134) * Schreiber, Bert: Acknowledgments. (line 38) * Schreiber, Rita: Acknowledgments. (line 38) @@ -35304,7 +35326,7 @@ Index * sidebar, Beware The Smoke and Mirrors!: Bitwise Functions. (line 126) * sidebar, Changing FS Does Not Affect the Fields: Full Line Fields. (line 14) -* sidebar, Changing NR and FNR: Auto-set. (line 356) +* sidebar, Changing NR and FNR: Auto-set. (line 375) * sidebar, Controlling Output Buffering with system(): I/O Functions. (line 164) * sidebar, Escape Sequences for Metacharacters: Escape Sequences. @@ -35467,9 +35489,9 @@ Index * substr: String Functions. (line 484) * substring: String Functions. (line 484) * Sumner, Andrew: Other Versions. (line 68) -* supplementary groups of gawk process: Auto-set. (line 252) +* supplementary groups of gawk process: Auto-set. (line 271) * switch statement: Switch Statement. (line 6) -* SYMTAB array: Auto-set. (line 300) +* SYMTAB array: Auto-set. (line 319) * syntactic ambiguity: /= operator vs. /=.../ regexp constant: Assignment Ops. (line 149) * system: I/O Functions. (line 107) @@ -35651,10 +35673,10 @@ Index * variables, uninitialized, as array subscripts: Uninitialized Subscripts. (line 6) * variables, user-defined: Variables. (line 6) -* version of gawk: Auto-set. (line 222) -* version of gawk extension API: Auto-set. (line 247) -* version of GNU MP library: Auto-set. (line 230) -* version of GNU MPFR library: Auto-set. (line 232) +* version of gawk: Auto-set. (line 241) +* version of gawk extension API: Auto-set. (line 266) +* version of GNU MP library: Auto-set. (line 249) +* version of GNU MPFR library: Auto-set. (line 251) * vertical bar (|): Regexp Operators. (line 70) * vertical bar (|), | operator (I/O): Getline/Pipe. (line 10) * vertical bar (|), | operator (I/O) <1>: Precedence. (line 64) @@ -35933,368 +35955,368 @@ Node: Exit Statement449516 Node: Built-in Variables451919 Node: User-modified453052 Node: Auto-set460819 -Ref: Auto-set-Footnote-1475547 -Ref: Auto-set-Footnote-2475753 -Node: ARGC and ARGV475809 -Node: Pattern Action Summary480022 -Node: Arrays482452 -Node: Array Basics483781 -Node: Array Intro484625 -Ref: figure-array-elements486600 -Ref: Array Intro-Footnote-1489304 -Node: Reference to Elements489432 -Node: Assigning Elements491896 -Node: Array Example492387 -Node: Scanning an Array494146 -Node: Controlling Scanning497168 -Ref: Controlling Scanning-Footnote-1502567 -Node: Numeric Array Subscripts502883 -Node: Uninitialized Subscripts505067 -Node: Delete506686 -Ref: Delete-Footnote-1509438 -Node: Multidimensional509495 -Node: Multiscanning512590 -Node: Arrays of Arrays514181 -Node: Arrays Summary518948 -Node: Functions521041 -Node: Built-in522079 -Node: Calling Built-in523160 -Node: Numeric Functions525156 -Ref: Numeric Functions-Footnote-1530101 -Ref: Numeric Functions-Footnote-2530458 -Ref: Numeric Functions-Footnote-3530506 -Node: String Functions530778 -Ref: String Functions-Footnote-1554436 -Ref: String Functions-Footnote-2554564 -Ref: String Functions-Footnote-3554812 -Node: Gory Details554899 -Ref: table-sub-escapes556690 -Ref: table-sub-proposed558209 -Ref: table-posix-sub559572 -Ref: table-gensub-escapes561113 -Ref: Gory Details-Footnote-1561936 -Node: I/O Functions562090 -Ref: table-system-return-values568672 -Ref: I/O Functions-Footnote-1570652 -Ref: I/O Functions-Footnote-2570800 -Node: Time Functions570920 -Ref: Time Functions-Footnote-1581587 -Ref: Time Functions-Footnote-2581655 -Ref: Time Functions-Footnote-3581813 -Ref: Time Functions-Footnote-4581924 -Ref: Time Functions-Footnote-5582036 -Ref: Time Functions-Footnote-6582263 -Node: Bitwise Functions582529 -Ref: table-bitwise-ops583123 -Ref: Bitwise Functions-Footnote-1589156 -Ref: Bitwise Functions-Footnote-2589329 -Node: Type Functions589520 -Node: I18N Functions592195 -Node: User-defined593846 -Node: Definition Syntax594651 -Ref: Definition Syntax-Footnote-1600338 -Node: Function Example600409 -Ref: Function Example-Footnote-1603331 -Node: Function Caveats603353 -Node: Calling A Function603871 -Node: Variable Scope604829 -Node: Pass By Value/Reference607823 -Node: Return Statement611322 -Node: Dynamic Typing614301 -Node: Indirect Calls615231 -Ref: Indirect Calls-Footnote-1625482 -Node: Functions Summary625610 -Node: Library Functions628315 -Ref: Library Functions-Footnote-1631922 -Ref: Library Functions-Footnote-2632065 -Node: Library Names632236 -Ref: Library Names-Footnote-1635696 -Ref: Library Names-Footnote-2635919 -Node: General Functions636005 -Node: Strtonum Function637108 -Node: Assert Function640130 -Node: Round Function643456 -Node: Cliff Random Function644997 -Node: Ordinal Functions646013 -Ref: Ordinal Functions-Footnote-1649076 -Ref: Ordinal Functions-Footnote-2649328 -Node: Join Function649538 -Ref: Join Function-Footnote-1651308 -Node: Getlocaltime Function651508 -Node: Readfile Function655250 -Node: Shell Quoting657222 -Node: Data File Management658623 -Node: Filetrans Function659255 -Node: Rewind Function663351 -Node: File Checking665257 -Ref: File Checking-Footnote-1666591 -Node: Empty Files666792 -Node: Ignoring Assigns668771 -Node: Getopt Function670321 -Ref: Getopt Function-Footnote-1681790 -Node: Passwd Functions681990 -Ref: Passwd Functions-Footnote-1690829 -Node: Group Functions690917 -Ref: Group Functions-Footnote-1698815 -Node: Walking Arrays699022 -Node: Library Functions Summary702030 -Node: Library Exercises703436 -Node: Sample Programs703901 -Node: Running Examples704671 -Node: Clones705399 -Node: Cut Program706623 -Node: Egrep Program716552 -Ref: Egrep Program-Footnote-1724064 -Node: Id Program724174 -Node: Split Program727854 -Ref: Split Program-Footnote-1731313 -Node: Tee Program731442 -Node: Uniq Program734232 -Node: Wc Program741658 -Ref: Wc Program-Footnote-1745913 -Node: Miscellaneous Programs746007 -Node: Dupword Program747220 -Node: Alarm Program749250 -Node: Translate Program754105 -Ref: Translate Program-Footnote-1758670 -Node: Labels Program758940 -Ref: Labels Program-Footnote-1762291 -Node: Word Sorting762375 -Node: History Sorting766447 -Node: Extract Program768282 -Node: Simple Sed775811 -Node: Igawk Program778885 -Ref: Igawk Program-Footnote-1793216 -Ref: Igawk Program-Footnote-2793418 -Ref: Igawk Program-Footnote-3793540 -Node: Anagram Program793655 -Node: Signature Program796717 -Node: Programs Summary797964 -Node: Programs Exercises799178 -Ref: Programs Exercises-Footnote-1803307 -Node: Advanced Features803398 -Node: Nondecimal Data805388 -Node: Array Sorting806979 -Node: Controlling Array Traversal807679 -Ref: Controlling Array Traversal-Footnote-1816046 -Node: Array Sorting Functions816164 -Ref: Array Sorting Functions-Footnote-1821255 -Node: Two-way I/O821451 -Ref: Two-way I/O-Footnote-1828002 -Ref: Two-way I/O-Footnote-2828189 -Node: TCP/IP Networking828271 -Node: Profiling831389 -Ref: Profiling-Footnote-1840061 -Node: Advanced Features Summary840384 -Node: Internationalization842228 -Node: I18N and L10N843708 -Node: Explaining gettext844395 -Ref: Explaining gettext-Footnote-1850287 -Ref: Explaining gettext-Footnote-2850472 -Node: Programmer i18n850637 -Ref: Programmer i18n-Footnote-1855586 -Node: Translator i18n855635 -Node: String Extraction856429 -Ref: String Extraction-Footnote-1857561 -Node: Printf Ordering857647 -Ref: Printf Ordering-Footnote-1860433 -Node: I18N Portability860497 -Ref: I18N Portability-Footnote-1862953 -Node: I18N Example863016 -Ref: I18N Example-Footnote-1865822 -Node: Gawk I18N865895 -Node: I18N Summary866540 -Node: Debugger867881 -Node: Debugging868903 -Node: Debugging Concepts869344 -Node: Debugging Terms871153 -Node: Awk Debugging873728 -Node: Sample Debugging Session874634 -Node: Debugger Invocation875168 -Node: Finding The Bug876554 -Node: List of Debugger Commands883032 -Node: Breakpoint Control884365 -Node: Debugger Execution Control888059 -Node: Viewing And Changing Data891421 -Node: Execution Stack894795 -Node: Debugger Info896432 -Node: Miscellaneous Debugger Commands900503 -Node: Readline Support905591 -Node: Limitations906487 -Node: Debugging Summary908596 -Node: Arbitrary Precision Arithmetic909875 -Node: Computer Arithmetic911360 -Ref: table-numeric-ranges914951 -Ref: Computer Arithmetic-Footnote-1915673 -Node: Math Definitions915730 -Ref: table-ieee-formats919044 -Ref: Math Definitions-Footnote-1919647 -Node: MPFR features919752 -Node: FP Math Caution921469 -Ref: FP Math Caution-Footnote-1922541 -Node: Inexactness of computations922910 -Node: Inexact representation923870 -Node: Comparing FP Values925230 -Node: Errors accumulate926312 -Node: Getting Accuracy927745 -Node: Try To Round930455 -Node: Setting precision931354 -Ref: table-predefined-precision-strings932051 -Node: Setting the rounding mode933881 -Ref: table-gawk-rounding-modes934255 -Ref: Setting the rounding mode-Footnote-1937663 -Node: Arbitrary Precision Integers937842 -Ref: Arbitrary Precision Integers-Footnote-1942747 -Node: Checking for MPFR942896 -Node: POSIX Floating Point Problems944193 -Ref: POSIX Floating Point Problems-Footnote-1948064 -Node: Floating point summary948102 -Node: Dynamic Extensions950292 -Node: Extension Intro951845 -Node: Plugin License953111 -Node: Extension Mechanism Outline953908 -Ref: figure-load-extension954347 -Ref: figure-register-new-function955912 -Ref: figure-call-new-function957004 -Node: Extension API Description959066 -Node: Extension API Functions Introduction960708 -Node: General Data Types966042 -Ref: General Data Types-Footnote-1973247 -Node: Memory Allocation Functions973546 -Ref: Memory Allocation Functions-Footnote-1976391 -Node: Constructor Functions976490 -Node: Registration Functions979489 -Node: Extension Functions980174 -Node: Exit Callback Functions985387 -Node: Extension Version String986637 -Node: Input Parsers987300 -Node: Output Wrappers1000007 -Node: Two-way processors1004519 -Node: Printing Messages1006784 -Ref: Printing Messages-Footnote-11007955 -Node: Updating ERRNO1008108 -Node: Requesting Values1008847 -Ref: table-value-types-returned1009584 -Node: Accessing Parameters1010520 -Node: Symbol Table Access1011755 -Node: Symbol table by name1012267 -Node: Symbol table by cookie1014056 -Ref: Symbol table by cookie-Footnote-11018241 -Node: Cached values1018305 -Ref: Cached values-Footnote-11021841 -Node: Array Manipulation1021932 -Ref: Array Manipulation-Footnote-11023023 -Node: Array Data Types1023060 -Ref: Array Data Types-Footnote-11025718 -Node: Array Functions1025810 -Node: Flattening Arrays1030209 -Node: Creating Arrays1037150 -Node: Redirection API1041919 -Node: Extension API Variables1044761 -Node: Extension Versioning1045394 -Ref: gawk-api-version1045831 -Node: Extension API Informational Variables1047559 -Node: Extension API Boilerplate1048623 -Node: Changes from API V11052485 -Node: Finding Extensions1053145 -Node: Extension Example1053704 -Node: Internal File Description1054502 -Node: Internal File Ops1058582 -Ref: Internal File Ops-Footnote-11069982 -Node: Using Internal File Ops1070122 -Ref: Using Internal File Ops-Footnote-11072505 -Node: Extension Samples1072779 -Node: Extension Sample File Functions1074308 -Node: Extension Sample Fnmatch1081957 -Node: Extension Sample Fork1083444 -Node: Extension Sample Inplace1084662 -Node: Extension Sample Ord1087872 -Node: Extension Sample Readdir1088708 -Ref: table-readdir-file-types1089597 -Node: Extension Sample Revout1090402 -Node: Extension Sample Rev2way1090991 -Node: Extension Sample Read write array1091731 -Node: Extension Sample Readfile1093673 -Node: Extension Sample Time1094768 -Node: Extension Sample API Tests1096116 -Node: gawkextlib1096608 -Node: Extension summary1099055 -Node: Extension Exercises1102757 -Node: Language History1104255 -Node: V7/SVR3.11105911 -Node: SVR41108063 -Node: POSIX1109497 -Node: BTL1110876 -Node: POSIX/GNU1111605 -Node: Feature History1117497 -Node: Common Extensions1131867 -Node: Ranges and Locales1133150 -Ref: Ranges and Locales-Footnote-11137766 -Ref: Ranges and Locales-Footnote-21137793 -Ref: Ranges and Locales-Footnote-31138028 -Node: Contributors1138249 -Node: History summary1143809 -Node: Installation1145189 -Node: Gawk Distribution1146133 -Node: Getting1146617 -Node: Extracting1147578 -Node: Distribution contents1149216 -Node: Unix Installation1155558 -Node: Quick Installation1156240 -Node: Shell Startup Files1158654 -Node: Additional Configuration Options1159743 -Node: Configuration Philosophy1161732 -Node: Non-Unix Installation1164101 -Node: PC Installation1164561 -Node: PC Binary Installation1165399 -Node: PC Compiling1165834 -Node: PC Using1166951 -Node: Cygwin1169996 -Node: MSYS1170766 -Node: VMS Installation1171267 -Node: VMS Compilation1172058 -Ref: VMS Compilation-Footnote-11173287 -Node: VMS Dynamic Extensions1173345 -Node: VMS Installation Details1175030 -Node: VMS Running1177283 -Node: VMS GNV1181562 -Node: VMS Old Gawk1182297 -Node: Bugs1182768 -Node: Bug address1183431 -Node: Usenet1185828 -Node: Maintainers1186605 -Node: Other Versions1187981 -Node: Installation summary1194565 -Node: Notes1195600 -Node: Compatibility Mode1196465 -Node: Additions1197247 -Node: Accessing The Source1198172 -Node: Adding Code1199607 -Node: New Ports1205825 -Node: Derived Files1210313 -Ref: Derived Files-Footnote-11215798 -Ref: Derived Files-Footnote-21215833 -Ref: Derived Files-Footnote-31216431 -Node: Future Extensions1216545 -Node: Implementation Limitations1217203 -Node: Extension Design1218386 -Node: Old Extension Problems1219540 -Ref: Old Extension Problems-Footnote-11221058 -Node: Extension New Mechanism Goals1221115 -Ref: Extension New Mechanism Goals-Footnote-11224479 -Node: Extension Other Design Decisions1224668 -Node: Extension Future Growth1226781 -Node: Old Extension Mechanism1227617 -Node: Notes summary1229380 -Node: Basic Concepts1230562 -Node: Basic High Level1231243 -Ref: figure-general-flow1231525 -Ref: figure-process-flow1232210 -Ref: Basic High Level-Footnote-11235511 -Node: Basic Data Typing1235696 -Node: Glossary1239024 -Node: Copying1270971 -Node: GNU Free Documentation License1308510 -Node: Index1333628 +Ref: Auto-set-Footnote-1476416 +Ref: Auto-set-Footnote-2476622 +Node: ARGC and ARGV476678 +Node: Pattern Action Summary480891 +Node: Arrays483321 +Node: Array Basics484650 +Node: Array Intro485494 +Ref: figure-array-elements487469 +Ref: Array Intro-Footnote-1490173 +Node: Reference to Elements490301 +Node: Assigning Elements492765 +Node: Array Example493256 +Node: Scanning an Array495015 +Node: Controlling Scanning498037 +Ref: Controlling Scanning-Footnote-1503436 +Node: Numeric Array Subscripts503752 +Node: Uninitialized Subscripts505936 +Node: Delete507555 +Ref: Delete-Footnote-1510307 +Node: Multidimensional510364 +Node: Multiscanning513459 +Node: Arrays of Arrays515050 +Node: Arrays Summary519817 +Node: Functions521910 +Node: Built-in522948 +Node: Calling Built-in524029 +Node: Numeric Functions526025 +Ref: Numeric Functions-Footnote-1530970 +Ref: Numeric Functions-Footnote-2531327 +Ref: Numeric Functions-Footnote-3531375 +Node: String Functions531647 +Ref: String Functions-Footnote-1555305 +Ref: String Functions-Footnote-2555433 +Ref: String Functions-Footnote-3555681 +Node: Gory Details555768 +Ref: table-sub-escapes557559 +Ref: table-sub-proposed559078 +Ref: table-posix-sub560441 +Ref: table-gensub-escapes561982 +Ref: Gory Details-Footnote-1562805 +Node: I/O Functions562959 +Ref: table-system-return-values569541 +Ref: I/O Functions-Footnote-1571521 +Ref: I/O Functions-Footnote-2571669 +Node: Time Functions571789 +Ref: Time Functions-Footnote-1582456 +Ref: Time Functions-Footnote-2582524 +Ref: Time Functions-Footnote-3582682 +Ref: Time Functions-Footnote-4582793 +Ref: Time Functions-Footnote-5582905 +Ref: Time Functions-Footnote-6583132 +Node: Bitwise Functions583398 +Ref: table-bitwise-ops583992 +Ref: Bitwise Functions-Footnote-1590025 +Ref: Bitwise Functions-Footnote-2590198 +Node: Type Functions590389 +Node: I18N Functions593064 +Node: User-defined594715 +Node: Definition Syntax595520 +Ref: Definition Syntax-Footnote-1601207 +Node: Function Example601278 +Ref: Function Example-Footnote-1604200 +Node: Function Caveats604222 +Node: Calling A Function604740 +Node: Variable Scope605698 +Node: Pass By Value/Reference608692 +Node: Return Statement612191 +Node: Dynamic Typing615170 +Node: Indirect Calls616100 +Ref: Indirect Calls-Footnote-1626351 +Node: Functions Summary626479 +Node: Library Functions629184 +Ref: Library Functions-Footnote-1632791 +Ref: Library Functions-Footnote-2632934 +Node: Library Names633105 +Ref: Library Names-Footnote-1636565 +Ref: Library Names-Footnote-2636788 +Node: General Functions636874 +Node: Strtonum Function637977 +Node: Assert Function640999 +Node: Round Function644325 +Node: Cliff Random Function645866 +Node: Ordinal Functions646882 +Ref: Ordinal Functions-Footnote-1649945 +Ref: Ordinal Functions-Footnote-2650197 +Node: Join Function650407 +Ref: Join Function-Footnote-1652177 +Node: Getlocaltime Function652377 +Node: Readfile Function656119 +Node: Shell Quoting658091 +Node: Data File Management659492 +Node: Filetrans Function660124 +Node: Rewind Function664220 +Node: File Checking666126 +Ref: File Checking-Footnote-1667460 +Node: Empty Files667661 +Node: Ignoring Assigns669640 +Node: Getopt Function671190 +Ref: Getopt Function-Footnote-1682659 +Node: Passwd Functions682859 +Ref: Passwd Functions-Footnote-1691698 +Node: Group Functions691786 +Ref: Group Functions-Footnote-1699684 +Node: Walking Arrays699891 +Node: Library Functions Summary702899 +Node: Library Exercises704305 +Node: Sample Programs704770 +Node: Running Examples705540 +Node: Clones706268 +Node: Cut Program707492 +Node: Egrep Program717421 +Ref: Egrep Program-Footnote-1724933 +Node: Id Program725043 +Node: Split Program728723 +Ref: Split Program-Footnote-1732182 +Node: Tee Program732311 +Node: Uniq Program735101 +Node: Wc Program742527 +Ref: Wc Program-Footnote-1746782 +Node: Miscellaneous Programs746876 +Node: Dupword Program748089 +Node: Alarm Program750119 +Node: Translate Program754974 +Ref: Translate Program-Footnote-1759539 +Node: Labels Program759809 +Ref: Labels Program-Footnote-1763160 +Node: Word Sorting763244 +Node: History Sorting767316 +Node: Extract Program769151 +Node: Simple Sed776680 +Node: Igawk Program779754 +Ref: Igawk Program-Footnote-1794085 +Ref: Igawk Program-Footnote-2794287 +Ref: Igawk Program-Footnote-3794409 +Node: Anagram Program794524 +Node: Signature Program797586 +Node: Programs Summary798833 +Node: Programs Exercises800047 +Ref: Programs Exercises-Footnote-1804176 +Node: Advanced Features804267 +Node: Nondecimal Data806257 +Node: Array Sorting807848 +Node: Controlling Array Traversal808548 +Ref: Controlling Array Traversal-Footnote-1816915 +Node: Array Sorting Functions817033 +Ref: Array Sorting Functions-Footnote-1822124 +Node: Two-way I/O822320 +Ref: Two-way I/O-Footnote-1828871 +Ref: Two-way I/O-Footnote-2829058 +Node: TCP/IP Networking829140 +Node: Profiling832258 +Ref: Profiling-Footnote-1840930 +Node: Advanced Features Summary841253 +Node: Internationalization843097 +Node: I18N and L10N844577 +Node: Explaining gettext845264 +Ref: Explaining gettext-Footnote-1851156 +Ref: Explaining gettext-Footnote-2851341 +Node: Programmer i18n851506 +Ref: Programmer i18n-Footnote-1856455 +Node: Translator i18n856504 +Node: String Extraction857298 +Ref: String Extraction-Footnote-1858430 +Node: Printf Ordering858516 +Ref: Printf Ordering-Footnote-1861302 +Node: I18N Portability861366 +Ref: I18N Portability-Footnote-1863822 +Node: I18N Example863885 +Ref: I18N Example-Footnote-1866691 +Node: Gawk I18N866764 +Node: I18N Summary867409 +Node: Debugger868750 +Node: Debugging869772 +Node: Debugging Concepts870213 +Node: Debugging Terms872022 +Node: Awk Debugging874597 +Node: Sample Debugging Session875503 +Node: Debugger Invocation876037 +Node: Finding The Bug877423 +Node: List of Debugger Commands883901 +Node: Breakpoint Control885234 +Node: Debugger Execution Control888928 +Node: Viewing And Changing Data892290 +Node: Execution Stack895664 +Node: Debugger Info897301 +Node: Miscellaneous Debugger Commands901372 +Node: Readline Support906460 +Node: Limitations907356 +Node: Debugging Summary909465 +Node: Arbitrary Precision Arithmetic910744 +Node: Computer Arithmetic912229 +Ref: table-numeric-ranges915820 +Ref: Computer Arithmetic-Footnote-1916542 +Node: Math Definitions916599 +Ref: table-ieee-formats919913 +Ref: Math Definitions-Footnote-1920516 +Node: MPFR features920621 +Node: FP Math Caution922338 +Ref: FP Math Caution-Footnote-1923410 +Node: Inexactness of computations923779 +Node: Inexact representation924739 +Node: Comparing FP Values926099 +Node: Errors accumulate927181 +Node: Getting Accuracy928614 +Node: Try To Round931324 +Node: Setting precision932223 +Ref: table-predefined-precision-strings932920 +Node: Setting the rounding mode934750 +Ref: table-gawk-rounding-modes935124 +Ref: Setting the rounding mode-Footnote-1938532 +Node: Arbitrary Precision Integers938711 +Ref: Arbitrary Precision Integers-Footnote-1943616 +Node: Checking for MPFR943765 +Node: POSIX Floating Point Problems945062 +Ref: POSIX Floating Point Problems-Footnote-1948933 +Node: Floating point summary948971 +Node: Dynamic Extensions951161 +Node: Extension Intro952714 +Node: Plugin License953980 +Node: Extension Mechanism Outline954777 +Ref: figure-load-extension955216 +Ref: figure-register-new-function956781 +Ref: figure-call-new-function957873 +Node: Extension API Description959935 +Node: Extension API Functions Introduction961577 +Node: General Data Types966911 +Ref: General Data Types-Footnote-1974116 +Node: Memory Allocation Functions974415 +Ref: Memory Allocation Functions-Footnote-1977260 +Node: Constructor Functions977359 +Node: Registration Functions980358 +Node: Extension Functions981043 +Node: Exit Callback Functions986256 +Node: Extension Version String987506 +Node: Input Parsers988169 +Node: Output Wrappers1000876 +Node: Two-way processors1005388 +Node: Printing Messages1007653 +Ref: Printing Messages-Footnote-11008824 +Node: Updating ERRNO1008977 +Node: Requesting Values1009716 +Ref: table-value-types-returned1010453 +Node: Accessing Parameters1011389 +Node: Symbol Table Access1012624 +Node: Symbol table by name1013136 +Node: Symbol table by cookie1014925 +Ref: Symbol table by cookie-Footnote-11019110 +Node: Cached values1019174 +Ref: Cached values-Footnote-11022710 +Node: Array Manipulation1022801 +Ref: Array Manipulation-Footnote-11023892 +Node: Array Data Types1023929 +Ref: Array Data Types-Footnote-11026587 +Node: Array Functions1026679 +Node: Flattening Arrays1031078 +Node: Creating Arrays1038019 +Node: Redirection API1042788 +Node: Extension API Variables1045630 +Node: Extension Versioning1046263 +Ref: gawk-api-version1046700 +Node: Extension API Informational Variables1048428 +Node: Extension API Boilerplate1049492 +Node: Changes from API V11053354 +Node: Finding Extensions1054014 +Node: Extension Example1054573 +Node: Internal File Description1055371 +Node: Internal File Ops1059451 +Ref: Internal File Ops-Footnote-11070851 +Node: Using Internal File Ops1070991 +Ref: Using Internal File Ops-Footnote-11073374 +Node: Extension Samples1073648 +Node: Extension Sample File Functions1075177 +Node: Extension Sample Fnmatch1082826 +Node: Extension Sample Fork1084313 +Node: Extension Sample Inplace1085531 +Node: Extension Sample Ord1088741 +Node: Extension Sample Readdir1089577 +Ref: table-readdir-file-types1090466 +Node: Extension Sample Revout1091271 +Node: Extension Sample Rev2way1091860 +Node: Extension Sample Read write array1092600 +Node: Extension Sample Readfile1094542 +Node: Extension Sample Time1095637 +Node: Extension Sample API Tests1096985 +Node: gawkextlib1097477 +Node: Extension summary1099924 +Node: Extension Exercises1103626 +Node: Language History1105124 +Node: V7/SVR3.11106780 +Node: SVR41108932 +Node: POSIX1110366 +Node: BTL1111745 +Node: POSIX/GNU1112474 +Node: Feature History1118366 +Node: Common Extensions1132790 +Node: Ranges and Locales1134073 +Ref: Ranges and Locales-Footnote-11138689 +Ref: Ranges and Locales-Footnote-21138716 +Ref: Ranges and Locales-Footnote-31138951 +Node: Contributors1139172 +Node: History summary1144732 +Node: Installation1146112 +Node: Gawk Distribution1147056 +Node: Getting1147540 +Node: Extracting1148501 +Node: Distribution contents1150139 +Node: Unix Installation1156481 +Node: Quick Installation1157163 +Node: Shell Startup Files1159577 +Node: Additional Configuration Options1160666 +Node: Configuration Philosophy1162655 +Node: Non-Unix Installation1165024 +Node: PC Installation1165484 +Node: PC Binary Installation1166322 +Node: PC Compiling1166757 +Node: PC Using1167874 +Node: Cygwin1170919 +Node: MSYS1171689 +Node: VMS Installation1172190 +Node: VMS Compilation1172981 +Ref: VMS Compilation-Footnote-11174210 +Node: VMS Dynamic Extensions1174268 +Node: VMS Installation Details1175953 +Node: VMS Running1178206 +Node: VMS GNV1182485 +Node: VMS Old Gawk1183220 +Node: Bugs1183691 +Node: Bug address1184354 +Node: Usenet1186751 +Node: Maintainers1187528 +Node: Other Versions1188904 +Node: Installation summary1195488 +Node: Notes1196523 +Node: Compatibility Mode1197388 +Node: Additions1198170 +Node: Accessing The Source1199095 +Node: Adding Code1200530 +Node: New Ports1206748 +Node: Derived Files1211236 +Ref: Derived Files-Footnote-11216721 +Ref: Derived Files-Footnote-21216756 +Ref: Derived Files-Footnote-31217354 +Node: Future Extensions1217468 +Node: Implementation Limitations1218126 +Node: Extension Design1219309 +Node: Old Extension Problems1220463 +Ref: Old Extension Problems-Footnote-11221981 +Node: Extension New Mechanism Goals1222038 +Ref: Extension New Mechanism Goals-Footnote-11225402 +Node: Extension Other Design Decisions1225591 +Node: Extension Future Growth1227704 +Node: Old Extension Mechanism1228540 +Node: Notes summary1230303 +Node: Basic Concepts1231485 +Node: Basic High Level1232166 +Ref: figure-general-flow1232448 +Ref: figure-process-flow1233133 +Ref: Basic High Level-Footnote-11236434 +Node: Basic Data Typing1236619 +Node: Glossary1239947 +Node: Copying1271894 +Node: GNU Free Documentation License1309433 +Node: Index1334551 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index e7d75521..c344acfb 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -4981,25 +4981,6 @@ function names added by @command{gawk} after the code was written. Standard @command{awk} built-in functions, such as @code{sin()} or @code{substr()} are @emph{not} shadowed in this way. -The @code{PROCINFO["argv"]} array contains all of the command-line arguments -(after glob expansion and redirection processing on platforms where that must -be done manually by the program) with subscripts ranging from 0 through -@code{argc} @minus{} 1. For example, @code{PROCINFO["argv"][0]} will contain -the name by which @command{gawk} was invoked. Here is an example of how this -feature may be used: - -@example -gawk ' -BEGIN @{ - for (i = 0; i < length(PROCINFO["argv"]); i++) - print i, PROCINFO["argv"][i] -@}' -@end example - -Please note that this differs from the standard @code{ARGV} array which does -not include command-line arguments that have already been processed by -@command{gawk} (@pxref{ARGC and ARGV}). - @end ignore @node Invoking Summary @@ -15484,6 +15465,27 @@ The following elements (listed alphabetically) are guaranteed to be available: @table @code +@item PROCINFO["argv"] +@cindex command line arguments, @code{PROCINFO["argv"} +The @code{PROCINFO["argv"]} array contains all of the command-line arguments +(after glob expansion and redirection processing on platforms where that must +be done manually by the program) with subscripts ranging from 0 through +@code{argc} @minus{} 1. For example, @code{PROCINFO["argv"][0]} will contain +the name by which @command{gawk} was invoked. Here is an example of how this +feature may be used: + +@example +gawk ' +BEGIN @{ + for (i = 0; i < length(PROCINFO["argv"]); i++) + print i, PROCINFO["argv"][i] +@}' +@end example + +Please note that this differs from the standard @code{ARGV} array which does +not include command-line arguments that have already been processed by +@command{gawk} (@pxref{ARGC and ARGV}). + @cindex effective group ID of @command{gawk} user @item PROCINFO["egid"] The value of the @code{getegid()} system call. @@ -38012,6 +38014,10 @@ environment and that of programs that it runs. @xref{Auto-set}. @item +The @code{PROCINFO["argv"} array. +@xref{Auto-set}. + +@item The @option{--pretty-print} option no longer runs the @command{awk} program too. @xref{Options}. diff --git a/doc/gawktexi.in b/doc/gawktexi.in index f95360d2..4cf6294d 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -4892,25 +4892,6 @@ function names added by @command{gawk} after the code was written. Standard @command{awk} built-in functions, such as @code{sin()} or @code{substr()} are @emph{not} shadowed in this way. -The @code{PROCINFO["argv"]} array contains all of the command-line arguments -(after glob expansion and redirection processing on platforms where that must -be done manually by the program) with subscripts ranging from 0 through -@code{argc} @minus{} 1. For example, @code{PROCINFO["argv"][0]} will contain -the name by which @command{gawk} was invoked. Here is an example of how this -feature may be used: - -@example -gawk ' -BEGIN @{ - for (i = 0; i < length(PROCINFO["argv"]); i++) - print i, PROCINFO["argv"][i] -@}' -@end example - -Please note that this differs from the standard @code{ARGV} array which does -not include command-line arguments that have already been processed by -@command{gawk} (@pxref{ARGC and ARGV}). - @end ignore @node Invoking Summary @@ -14803,6 +14784,27 @@ The following elements (listed alphabetically) are guaranteed to be available: @table @code +@item PROCINFO["argv"] +@cindex command line arguments, @code{PROCINFO["argv"} +The @code{PROCINFO["argv"]} array contains all of the command-line arguments +(after glob expansion and redirection processing on platforms where that must +be done manually by the program) with subscripts ranging from 0 through +@code{argc} @minus{} 1. For example, @code{PROCINFO["argv"][0]} will contain +the name by which @command{gawk} was invoked. Here is an example of how this +feature may be used: + +@example +gawk ' +BEGIN @{ + for (i = 0; i < length(PROCINFO["argv"]); i++) + print i, PROCINFO["argv"][i] +@}' +@end example + +Please note that this differs from the standard @code{ARGV} array which does +not include command-line arguments that have already been processed by +@command{gawk} (@pxref{ARGC and ARGV}). + @cindex effective group ID of @command{gawk} user @item PROCINFO["egid"] The value of the @code{getegid()} system call. @@ -37026,6 +37028,10 @@ environment and that of programs that it runs. @xref{Auto-set}. @item +The @code{PROCINFO["argv"} array. +@xref{Auto-set}. + +@item The @option{--pretty-print} option no longer runs the @command{awk} program too. @xref{Options}. |