diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-11-26 20:53:35 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-11-26 20:53:35 +0200 |
commit | 6e786c0622d9afd845ff56ac83c6bc9726dbe230 (patch) | |
tree | 4c4894d35e2da7671750de7cac845471f1fa4728 /doc | |
parent | 868a694807f0b0a617a47648910a7004b2b9ff97 (diff) | |
parent | 7eac08335f61dc6b0f236f9bf7c3ad434576b70f (diff) | |
download | gawk-6e786c0622d9afd845ff56ac83c6bc9726dbe230.tar.gz |
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 8 | ||||
-rw-r--r-- | doc/gawk.1 | 10 | ||||
-rw-r--r-- | doc/gawk.info | 726 | ||||
-rw-r--r-- | doc/gawk.texi | 7 | ||||
-rw-r--r-- | doc/gawktexi.in | 7 |
5 files changed, 387 insertions, 371 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 16364354..26d310d7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,11 @@ +2018-11-26 Arnold D. Robbins <arnold@skeeve.com> + + * gawktexi.in: Document that split() third arg is like FS, if it's + a single character, that character is used, even if it's a + regexp metacharacter. + * gawk.1: Ditto. + Thanks to R <0xef967c36@gmail.com> for the report. + 2018-11-25 Arnold D. Robbins <arnold@skeeve.com> * gawktexi.in: Document PROCINFO["platform"]. @@ -13,7 +13,7 @@ . if \w'\(rq' .ds rq "\(rq . \} .\} -.TH GAWK 1 "Apr 08 2018" "Free Software Foundation" "Utility Commands" +.TH GAWK 1 "Nov 26 2018" "Free Software Foundation" "Utility Commands" .SH NAME gawk \- pattern scanning and processing language .SH SYNOPSIS @@ -3053,7 +3053,7 @@ is the possibly null separator that appeared after The value of .B seps[0] is the possibly null leading separator. -\&\fRIf +If .I r is omitted, .B FPAT @@ -3093,7 +3093,7 @@ between .BI a[ i ] and .BI a[ i +1]\fR. -\&\fRIf +If .I r is a single space, then leading whitespace in .I s @@ -3106,6 +3106,10 @@ where is the return value of .BI split( s ", " a ", " r ", " seps )\fR. Splitting behaves identically to field splitting, described above. +In particular, if +.I r +is a single-character string, that string acts as the separator, +even if it happens to be a regular expression metacharacter. .TP .BI sprintf( fmt , " expr-list" ) Print diff --git a/doc/gawk.info b/doc/gawk.info index 986c97d4..17fee5c1 100644 --- a/doc/gawk.info +++ b/doc/gawk.info @@ -12978,8 +12978,8 @@ Options::): into 'SEPS[N]', where N is the return value of 'split()' (i.e., the number of elements in ARRAY). - The 'split()' function splits strings into pieces in a manner - similar to the way input lines are split into fields. For example: + The 'split()' function splits strings into pieces in the same way + that input lines are split into fields. For example: split("cul-de-sac", a, "-", seps) @@ -13003,7 +13003,9 @@ Options::): separated by runs of whitespace. Also, as with input field splitting, if FIELDSEP is the null string, each individual character in the string is split into its own array element. - (c.e.) + (c.e.) Additionally, if FIELDSEP is a single-character string, + that string acts as the separator, even if its value is a regular + expression metacharacter. Note, however, that 'RS' has no effect on the way 'split()' works. Even though 'RS = ""' causes the newline character to also be an @@ -33044,7 +33046,7 @@ Index * * (asterisk), * operator, as regexp operator: Regexp Operators. (line 89) * * (asterisk), * operator, null strings, matching: String Functions. - (line 540) + (line 542) * * (asterisk), ** operator: Arithmetic Ops. (line 81) * * (asterisk), ** operator <1>: Precedence. (line 48) * * (asterisk), **= operator: Assignment Ops. (line 129) @@ -33441,7 +33443,7 @@ Index * asterisk (*), * operator, as regexp operator: Regexp Operators. (line 89) * asterisk (*), * operator, null strings, matching: String Functions. - (line 540) + (line 542) * asterisk (*), ** operator: Arithmetic Ops. (line 81) * asterisk (*), ** operator <1>: Precedence. (line 48) * asterisk (*), **= operator: Assignment Ops. (line 129) @@ -33664,7 +33666,7 @@ Index * Brian Kernighan's awk <8>: Continue Statement. (line 44) * Brian Kernighan's awk <9>: Nextfile Statement. (line 47) * Brian Kernighan's awk <10>: Delete. (line 51) -* Brian Kernighan's awk <11>: String Functions. (line 496) +* Brian Kernighan's awk <11>: String Functions. (line 498) * Brian Kernighan's awk <12>: Gory Details. (line 19) * Brian Kernighan's awk <13>: I/O Functions. (line 43) * Brian Kernighan's awk, extensions: BTL. (line 6) @@ -33707,7 +33709,7 @@ Index * case sensitivity, and regexps: User-modified. (line 79) * case sensitivity, and string comparisons: User-modified. (line 79) * case sensitivity, array indices and: Array Intro. (line 100) -* case sensitivity, converting case: String Functions. (line 526) +* case sensitivity, converting case: String Functions. (line 528) * case sensitivity, example programs: Library Functions. (line 53) * case sensitivity, gawk: Case-sensitivity. (line 26) * case sensitivity, regexps and: Case-sensitivity. (line 6) @@ -33839,9 +33841,9 @@ Index * control statements: Statements. (line 6) * controlling array scanning order: Controlling Scanning. (line 14) -* convert string to lower case: String Functions. (line 527) -* convert string to number: String Functions. (line 394) -* convert string to upper case: String Functions. (line 533) +* convert string to lower case: String Functions. (line 529) +* convert string to number: String Functions. (line 396) +* convert string to upper case: String Functions. (line 535) * converting integer array subscripts: Numeric Array Subscripts. (line 31) * converting, dates to timestamps: Time Functions. (line 78) @@ -33924,7 +33926,7 @@ Index (line 149) * dark corner, regexp constants, as arguments to user-defined functions: Standard Regexp Constants. (line 43) -* dark corner, split() function: String Functions. (line 364) +* dark corner, split() function: String Functions. (line 366) * dark corner, string continuation: Scalar Constants. (line 53) * dark corner, strings, storing: gawk split records. (line 82) * dark corner, value of ARGV[0]: Auto-set. (line 39) @@ -34483,7 +34485,7 @@ Index * format time string: Time Functions. (line 50) * formats, numeric output: OFMT. (line 6) * formatting output: Printf. (line 6) -* formatting strings: String Functions. (line 387) +* formatting strings: String Functions. (line 389) * forward slash (/) to enclose regular expressions: Regexp. (line 10) * forward slash (/), / operator: Precedence. (line 54) * forward slash (/), /= operator: Assignment Ops. (line 129) @@ -34757,7 +34759,7 @@ Index * gsub: Standard Regexp Constants. (line 43) * gsub <1>: String Functions. (line 140) -* gsub() function, arguments of: String Functions. (line 466) +* gsub() function, arguments of: String Functions. (line 468) * gsub() function, escape processing: Gory Details. (line 6) * Guerrero, Juan Manuel: Acknowledgments. (line 60) * Guerrero, Juan Manuel <1>: Contributors. (line 150) @@ -35047,7 +35049,7 @@ Index * matching, expressions, See comparison expressions: Typing and Comparison. (line 9) * matching, leftmost longest: Multiple Line. (line 26) -* matching, null strings: String Functions. (line 540) +* matching, null strings: String Functions. (line 542) * mawk utility: Escape Sequences. (line 121) * mawk utility <1>: Getline/Pipe. (line 62) * mawk utility <2>: Concatenation. (line 36) @@ -35137,7 +35139,7 @@ Index (line 43) * null strings, converting numbers to strings: Strings And Numbers. (line 21) -* null strings, matching: String Functions. (line 540) +* null strings, matching: String Functions. (line 542) * number as string of bits: Bitwise Functions. (line 109) * number of array elements: String Functions. (line 201) * number sign (#), #! (executable scripts): Executable Scripts. @@ -35316,7 +35318,7 @@ Index * portability, operators: Increment Ops. (line 60) * portability, operators, not in POSIX awk: Precedence. (line 97) * portability, POSIXLY_CORRECT environment variable: Options. (line 376) -* portability, substr() function: String Functions. (line 516) +* portability, substr() function: String Functions. (line 518) * portable object files: Explaining gettext. (line 37) * portable object files <1>: Translator i18n. (line 6) * portable object files, converting to message object files: I18N Example. @@ -35568,7 +35570,7 @@ Index * regular expressions, searching for: Egrep Program. (line 6) * relational operators, See comparison operators: Typing and Comparison. (line 9) -* replace in string: String Functions. (line 412) +* replace in string: String Functions. (line 414) * retrying input: Retrying Input. (line 6) * return debugger command: Debugger Execution Control. (line 54) @@ -35738,7 +35740,7 @@ Index (line 37) * sidebar, Interactive Versus Noninteractive Buffering: I/O Functions. (line 74) -* sidebar, Matching the Null String: String Functions. (line 538) +* sidebar, Matching the Null String: String Functions. (line 540) * sidebar, Operator Evaluation Order: Increment Ops. (line 58) * sidebar, Piping into sh: Redirection. (line 134) * sidebar, Pre-POSIX awk Used OFMT for String Conversion: Strings And Numbers. @@ -35816,7 +35818,7 @@ Index * split() function, array elements, deleting: Delete. (line 61) * split.awk program: Split Program. (line 30) * sprintf: OFMT. (line 15) -* sprintf <1>: String Functions. (line 387) +* sprintf <1>: String Functions. (line 389) * sprintf() function, OFMT variable and: User-modified. (line 116) * sprintf() function, print/printf statements and: Round Function. (line 6) @@ -35862,7 +35864,7 @@ Index * strings, continuation across lines: Scalar Constants. (line 53) * strings, converting: Strings And Numbers. (line 6) * strings, converting <1>: Bitwise Functions. (line 109) -* strings, converting letter case: String Functions. (line 526) +* strings, converting letter case: String Functions. (line 528) * strings, converting, numbers to: User-modified. (line 30) * strings, converting, numbers to <1>: User-modified. (line 107) * strings, empty, See null strings: awk split records. (line 121) @@ -35873,13 +35875,13 @@ Index * strings, null: Regexp Field Splitting. (line 43) * strings, numeric: Variable Typing. (line 67) -* strtonum: String Functions. (line 394) +* strtonum: String Functions. (line 396) * strtonum() function (gawk), --non-decimal-data option and: Nondecimal Data. (line 35) * sub: Standard Regexp Constants. (line 43) -* sub <1>: String Functions. (line 412) -* sub() function, arguments of: String Functions. (line 466) +* sub <1>: String Functions. (line 414) +* sub() function, arguments of: String Functions. (line 468) * sub() function, escape processing: Gory Details. (line 6) * subscript separators: User-modified. (line 149) * subscripts in arrays, multidimensional: Multidimensional. (line 10) @@ -35893,8 +35895,8 @@ Index * SUBSEP variable, and multidimensional arrays: Multidimensional. (line 16) * substitute in string: String Functions. (line 89) -* substr: String Functions. (line 485) -* substring: String Functions. (line 485) +* substr: String Functions. (line 487) +* substring: String Functions. (line 487) * Sumner, Andrew: Other Versions. (line 64) * supplementary groups of gawk process: Auto-set. (line 293) * switch statement: Switch Statement. (line 6) @@ -35954,8 +35956,8 @@ Index * timestamps, converting dates to: Time Functions. (line 78) * timestamps, formatted: Getlocaltime Function. (line 6) -* tolower: String Functions. (line 527) -* toupper: String Functions. (line 533) +* tolower: String Functions. (line 529) +* toupper: String Functions. (line 535) * tr utility: Translate Program. (line 6) * trace debugger command: Miscellaneous Debugger Commands. (line 108) @@ -35981,7 +35983,7 @@ Index * troubleshooting, gawk, fatal errors, function arguments: Calling Built-in. (line 16) * troubleshooting, getline function: File Checking. (line 25) -* troubleshooting, gsub()/sub() functions: String Functions. (line 476) +* troubleshooting, gsub()/sub() functions: String Functions. (line 478) * troubleshooting, match() function: String Functions. (line 292) * troubleshooting, print statement, omitting commas: Print Examples. (line 30) @@ -35991,7 +35993,7 @@ Index * troubleshooting, regexp constants vs. string constants: Computed Regexps. (line 40) * troubleshooting, string concatenation: Concatenation. (line 27) -* troubleshooting, substr() function: String Functions. (line 503) +* troubleshooting, substr() function: String Functions. (line 505) * troubleshooting, system() function: I/O Functions. (line 128) * troubleshooting, typographical errors, global variables: Options. (line 99) @@ -36393,338 +36395,338 @@ Ref: Numeric Functions-Footnote-1536444 Ref: Numeric Functions-Footnote-2536801 Ref: Numeric Functions-Footnote-3536849 Node: String Functions537121 -Ref: String Functions-Footnote-1560830 -Ref: String Functions-Footnote-2560958 -Ref: String Functions-Footnote-3561206 -Node: Gory Details561293 -Ref: table-sub-escapes563084 -Ref: table-sub-proposed564603 -Ref: table-posix-sub565966 -Ref: table-gensub-escapes567507 -Ref: Gory Details-Footnote-1568330 -Node: I/O Functions568484 -Ref: table-system-return-values574952 -Ref: I/O Functions-Footnote-1577032 -Ref: I/O Functions-Footnote-2577180 -Node: Time Functions577300 -Ref: Time Functions-Footnote-1587971 -Ref: Time Functions-Footnote-2588039 -Ref: Time Functions-Footnote-3588197 -Ref: Time Functions-Footnote-4588308 -Ref: Time Functions-Footnote-5588420 -Ref: Time Functions-Footnote-6588647 -Node: Bitwise Functions588913 -Ref: table-bitwise-ops589507 -Ref: Bitwise Functions-Footnote-1595570 -Ref: Bitwise Functions-Footnote-2595743 -Node: Type Functions595934 -Node: I18N Functions598685 -Node: User-defined600336 -Node: Definition Syntax601141 -Ref: Definition Syntax-Footnote-1606828 -Node: Function Example606899 -Ref: Function Example-Footnote-1609821 -Node: Function Caveats609843 -Node: Calling A Function610361 -Node: Variable Scope611319 -Node: Pass By Value/Reference614313 -Node: Return Statement617812 -Node: Dynamic Typing620791 -Node: Indirect Calls621721 -Ref: Indirect Calls-Footnote-1631973 -Node: Functions Summary632101 -Node: Library Functions634806 -Ref: Library Functions-Footnote-1638413 -Ref: Library Functions-Footnote-2638556 -Node: Library Names638727 -Ref: Library Names-Footnote-1642187 -Ref: Library Names-Footnote-2642410 -Node: General Functions642496 -Node: Strtonum Function643599 -Node: Assert Function646621 -Node: Round Function649947 -Node: Cliff Random Function651487 -Node: Ordinal Functions652503 -Ref: Ordinal Functions-Footnote-1655566 -Ref: Ordinal Functions-Footnote-2655818 -Node: Join Function656028 -Ref: Join Function-Footnote-1657798 -Node: Getlocaltime Function657998 -Node: Readfile Function661740 -Node: Shell Quoting663717 -Node: Data File Management665118 -Node: Filetrans Function665750 -Node: Rewind Function669846 -Node: File Checking671756 -Ref: File Checking-Footnote-1673090 -Node: Empty Files673291 -Node: Ignoring Assigns675270 -Node: Getopt Function676820 -Ref: Getopt Function-Footnote-1688289 -Node: Passwd Functions688489 -Ref: Passwd Functions-Footnote-1697328 -Node: Group Functions697416 -Ref: Group Functions-Footnote-1705314 -Node: Walking Arrays705521 -Node: Library Functions Summary708529 -Node: Library Exercises709935 -Node: Sample Programs710400 -Node: Running Examples711170 -Node: Clones711898 -Node: Cut Program713122 -Node: Egrep Program723051 -Ref: Egrep Program-Footnote-1730563 -Node: Id Program730673 -Node: Split Program734353 -Ref: Split Program-Footnote-1737811 -Node: Tee Program737940 -Node: Uniq Program740730 -Node: Wc Program748156 -Ref: Wc Program-Footnote-1752411 -Node: Miscellaneous Programs752505 -Node: Dupword Program753718 -Node: Alarm Program755748 -Node: Translate Program760603 -Ref: Translate Program-Footnote-1765168 -Node: Labels Program765438 -Ref: Labels Program-Footnote-1768789 -Node: Word Sorting768873 -Node: History Sorting772945 -Node: Extract Program774780 -Node: Simple Sed782834 -Node: Igawk Program785908 -Ref: Igawk Program-Footnote-1800239 -Ref: Igawk Program-Footnote-2800441 -Ref: Igawk Program-Footnote-3800563 -Node: Anagram Program800678 -Node: Signature Program803740 -Node: Programs Summary804987 -Node: Programs Exercises806201 -Ref: Programs Exercises-Footnote-1810330 -Node: Advanced Features810421 -Node: Nondecimal Data812411 -Node: Array Sorting814002 -Node: Controlling Array Traversal814702 -Ref: Controlling Array Traversal-Footnote-1823070 -Node: Array Sorting Functions823188 -Ref: Array Sorting Functions-Footnote-1828279 -Node: Two-way I/O828475 -Ref: Two-way I/O-Footnote-1836195 -Ref: Two-way I/O-Footnote-2836382 -Node: TCP/IP Networking836464 -Node: Profiling839582 -Ref: Profiling-Footnote-1848254 -Node: Advanced Features Summary848577 -Node: Internationalization850421 -Node: I18N and L10N851901 -Node: Explaining gettext852588 -Ref: Explaining gettext-Footnote-1858480 -Ref: Explaining gettext-Footnote-2858665 -Node: Programmer i18n858830 -Ref: Programmer i18n-Footnote-1863779 -Node: Translator i18n863828 -Node: String Extraction864622 -Ref: String Extraction-Footnote-1865754 -Node: Printf Ordering865840 -Ref: Printf Ordering-Footnote-1868626 -Node: I18N Portability868690 -Ref: I18N Portability-Footnote-1871146 -Node: I18N Example871209 -Ref: I18N Example-Footnote-1874015 -Node: Gawk I18N874088 -Node: I18N Summary874733 -Node: Debugger876074 -Node: Debugging877097 -Node: Debugging Concepts877538 -Node: Debugging Terms879347 -Node: Awk Debugging881922 -Node: Sample Debugging Session882828 -Node: Debugger Invocation883362 -Node: Finding The Bug884748 -Node: List of Debugger Commands891226 -Node: Breakpoint Control892559 -Node: Debugger Execution Control896253 -Node: Viewing And Changing Data899615 -Node: Execution Stack902989 -Node: Debugger Info904626 -Node: Miscellaneous Debugger Commands908697 -Node: Readline Support913759 -Node: Limitations914655 -Node: Debugging Summary916764 -Node: Arbitrary Precision Arithmetic918043 -Node: Computer Arithmetic919528 -Ref: table-numeric-ranges923294 -Ref: table-floating-point-ranges923787 -Ref: Computer Arithmetic-Footnote-1924445 -Node: Math Definitions924502 -Ref: table-ieee-formats927818 -Ref: Math Definitions-Footnote-1928421 -Node: MPFR features928526 -Node: FP Math Caution930244 -Ref: FP Math Caution-Footnote-1931316 -Node: Inexactness of computations931685 -Node: Inexact representation932645 -Node: Comparing FP Values934005 -Node: Errors accumulate935246 -Node: Getting Accuracy936679 -Node: Try To Round939389 -Node: Setting precision940288 -Ref: table-predefined-precision-strings940985 -Node: Setting the rounding mode942815 -Ref: table-gawk-rounding-modes943189 -Ref: Setting the rounding mode-Footnote-1947120 -Node: Arbitrary Precision Integers947299 -Ref: Arbitrary Precision Integers-Footnote-1950474 -Node: Checking for MPFR950623 -Node: POSIX Floating Point Problems952097 -Ref: POSIX Floating Point Problems-Footnote-1956382 -Node: Floating point summary956420 -Node: Dynamic Extensions958610 -Node: Extension Intro960163 -Node: Plugin License961429 -Node: Extension Mechanism Outline962226 -Ref: figure-load-extension962665 -Ref: figure-register-new-function964230 -Ref: figure-call-new-function965322 -Node: Extension API Description967384 -Node: Extension API Functions Introduction969026 -Node: General Data Types974566 -Ref: General Data Types-Footnote-1982927 -Node: Memory Allocation Functions983226 -Ref: Memory Allocation Functions-Footnote-1987436 -Node: Constructor Functions987535 -Node: Registration Functions991121 -Node: Extension Functions991806 -Node: Exit Callback Functions997021 -Node: Extension Version String998271 -Node: Input Parsers998934 -Node: Output Wrappers1011655 -Node: Two-way processors1016167 -Node: Printing Messages1018432 -Ref: Printing Messages-Footnote-11019603 -Node: Updating ERRNO1019756 -Node: Requesting Values1020495 -Ref: table-value-types-returned1021232 -Node: Accessing Parameters1022168 -Node: Symbol Table Access1023403 -Node: Symbol table by name1023915 -Node: Symbol table by cookie1025704 -Ref: Symbol table by cookie-Footnote-11029889 -Node: Cached values1029953 -Ref: Cached values-Footnote-11033489 -Node: Array Manipulation1033642 -Ref: Array Manipulation-Footnote-11034733 -Node: Array Data Types1034770 -Ref: Array Data Types-Footnote-11037428 -Node: Array Functions1037520 -Node: Flattening Arrays1042018 -Node: Creating Arrays1048994 -Node: Redirection API1053761 -Node: Extension API Variables1056594 -Node: Extension Versioning1057305 -Ref: gawk-api-version1057734 -Node: Extension GMP/MPFR Versioning1059465 -Node: Extension API Informational Variables1061093 -Node: Extension API Boilerplate1062166 -Node: Changes from API V11066140 -Node: Finding Extensions1067712 -Node: Extension Example1068271 -Node: Internal File Description1069069 -Node: Internal File Ops1073149 -Ref: Internal File Ops-Footnote-11084499 -Node: Using Internal File Ops1084639 -Ref: Using Internal File Ops-Footnote-11087022 -Node: Extension Samples1087296 -Node: Extension Sample File Functions1088825 -Node: Extension Sample Fnmatch1096474 -Node: Extension Sample Fork1097961 -Node: Extension Sample Inplace1099179 -Node: Extension Sample Ord1102396 -Node: Extension Sample Readdir1103232 -Ref: table-readdir-file-types1104121 -Node: Extension Sample Revout1104926 -Node: Extension Sample Rev2way1105515 -Node: Extension Sample Read write array1106255 -Node: Extension Sample Readfile1108197 -Node: Extension Sample Time1109292 -Node: Extension Sample API Tests1110640 -Node: gawkextlib1111132 -Node: Extension summary1114050 -Node: Extension Exercises1117752 -Node: Language History1119250 -Node: V7/SVR3.11120906 -Node: SVR41123058 -Node: POSIX1124492 -Node: BTL1125872 -Node: POSIX/GNU1126601 -Node: Feature History1132379 -Node: Common Extensions1148425 -Node: Ranges and Locales1149708 -Ref: Ranges and Locales-Footnote-11154324 -Ref: Ranges and Locales-Footnote-21154351 -Ref: Ranges and Locales-Footnote-31154586 -Node: Contributors1154807 -Node: History summary1160752 -Node: Installation1162132 -Node: Gawk Distribution1163076 -Node: Getting1163560 -Node: Extracting1164523 -Node: Distribution contents1166161 -Node: Unix Installation1172641 -Node: Quick Installation1173323 -Node: Shell Startup Files1175737 -Node: Additional Configuration Options1176826 -Node: Configuration Philosophy1178991 -Node: Non-Unix Installation1181360 -Node: PC Installation1181820 -Node: PC Binary Installation1182658 -Node: PC Compiling1183093 -Node: PC Using1184210 -Node: Cygwin1187425 -Node: MSYS1188524 -Node: VMS Installation1189025 -Node: VMS Compilation1189816 -Ref: VMS Compilation-Footnote-11191045 -Node: VMS Dynamic Extensions1191103 -Node: VMS Installation Details1192788 -Node: VMS Running1195041 -Node: VMS GNV1199320 -Node: VMS Old Gawk1200055 -Node: Bugs1200526 -Node: Bug address1201189 -Node: Usenet1204171 -Node: Maintainers1205175 -Node: Other Versions1206436 -Node: Installation summary1212994 -Node: Notes1214196 -Node: Compatibility Mode1214990 -Node: Additions1215772 -Node: Accessing The Source1216697 -Node: Adding Code1218134 -Node: New Ports1224353 -Node: Derived Files1228841 -Ref: Derived Files-Footnote-11234487 -Ref: Derived Files-Footnote-21234522 -Ref: Derived Files-Footnote-31235120 -Node: Future Extensions1235234 -Node: Implementation Limitations1235892 -Node: Extension Design1237075 -Node: Old Extension Problems1238219 -Ref: Old Extension Problems-Footnote-11239737 -Node: Extension New Mechanism Goals1239794 -Ref: Extension New Mechanism Goals-Footnote-11243158 -Node: Extension Other Design Decisions1243347 -Node: Extension Future Growth1245460 -Node: Notes summary1246296 -Node: Basic Concepts1247471 -Node: Basic High Level1248152 -Ref: figure-general-flow1248434 -Ref: figure-process-flow1249119 -Ref: Basic High Level-Footnote-11252420 -Node: Basic Data Typing1252605 -Node: Glossary1255933 -Node: Copying1287771 -Node: GNU Free Documentation License1325314 -Node: Index1350434 +Ref: String Functions-Footnote-1560979 +Ref: String Functions-Footnote-2561107 +Ref: String Functions-Footnote-3561355 +Node: Gory Details561442 +Ref: table-sub-escapes563233 +Ref: table-sub-proposed564752 +Ref: table-posix-sub566115 +Ref: table-gensub-escapes567656 +Ref: Gory Details-Footnote-1568479 +Node: I/O Functions568633 +Ref: table-system-return-values575101 +Ref: I/O Functions-Footnote-1577181 +Ref: I/O Functions-Footnote-2577329 +Node: Time Functions577449 +Ref: Time Functions-Footnote-1588120 +Ref: Time Functions-Footnote-2588188 +Ref: Time Functions-Footnote-3588346 +Ref: Time Functions-Footnote-4588457 +Ref: Time Functions-Footnote-5588569 +Ref: Time Functions-Footnote-6588796 +Node: Bitwise Functions589062 +Ref: table-bitwise-ops589656 +Ref: Bitwise Functions-Footnote-1595719 +Ref: Bitwise Functions-Footnote-2595892 +Node: Type Functions596083 +Node: I18N Functions598834 +Node: User-defined600485 +Node: Definition Syntax601290 +Ref: Definition Syntax-Footnote-1606977 +Node: Function Example607048 +Ref: Function Example-Footnote-1609970 +Node: Function Caveats609992 +Node: Calling A Function610510 +Node: Variable Scope611468 +Node: Pass By Value/Reference614462 +Node: Return Statement617961 +Node: Dynamic Typing620940 +Node: Indirect Calls621870 +Ref: Indirect Calls-Footnote-1632122 +Node: Functions Summary632250 +Node: Library Functions634955 +Ref: Library Functions-Footnote-1638562 +Ref: Library Functions-Footnote-2638705 +Node: Library Names638876 +Ref: Library Names-Footnote-1642336 +Ref: Library Names-Footnote-2642559 +Node: General Functions642645 +Node: Strtonum Function643748 +Node: Assert Function646770 +Node: Round Function650096 +Node: Cliff Random Function651636 +Node: Ordinal Functions652652 +Ref: Ordinal Functions-Footnote-1655715 +Ref: Ordinal Functions-Footnote-2655967 +Node: Join Function656177 +Ref: Join Function-Footnote-1657947 +Node: Getlocaltime Function658147 +Node: Readfile Function661889 +Node: Shell Quoting663866 +Node: Data File Management665267 +Node: Filetrans Function665899 +Node: Rewind Function669995 +Node: File Checking671905 +Ref: File Checking-Footnote-1673239 +Node: Empty Files673440 +Node: Ignoring Assigns675419 +Node: Getopt Function676969 +Ref: Getopt Function-Footnote-1688438 +Node: Passwd Functions688638 +Ref: Passwd Functions-Footnote-1697477 +Node: Group Functions697565 +Ref: Group Functions-Footnote-1705463 +Node: Walking Arrays705670 +Node: Library Functions Summary708678 +Node: Library Exercises710084 +Node: Sample Programs710549 +Node: Running Examples711319 +Node: Clones712047 +Node: Cut Program713271 +Node: Egrep Program723200 +Ref: Egrep Program-Footnote-1730712 +Node: Id Program730822 +Node: Split Program734502 +Ref: Split Program-Footnote-1737960 +Node: Tee Program738089 +Node: Uniq Program740879 +Node: Wc Program748305 +Ref: Wc Program-Footnote-1752560 +Node: Miscellaneous Programs752654 +Node: Dupword Program753867 +Node: Alarm Program755897 +Node: Translate Program760752 +Ref: Translate Program-Footnote-1765317 +Node: Labels Program765587 +Ref: Labels Program-Footnote-1768938 +Node: Word Sorting769022 +Node: History Sorting773094 +Node: Extract Program774929 +Node: Simple Sed782983 +Node: Igawk Program786057 +Ref: Igawk Program-Footnote-1800388 +Ref: Igawk Program-Footnote-2800590 +Ref: Igawk Program-Footnote-3800712 +Node: Anagram Program800827 +Node: Signature Program803889 +Node: Programs Summary805136 +Node: Programs Exercises806350 +Ref: Programs Exercises-Footnote-1810479 +Node: Advanced Features810570 +Node: Nondecimal Data812560 +Node: Array Sorting814151 +Node: Controlling Array Traversal814851 +Ref: Controlling Array Traversal-Footnote-1823219 +Node: Array Sorting Functions823337 +Ref: Array Sorting Functions-Footnote-1828428 +Node: Two-way I/O828624 +Ref: Two-way I/O-Footnote-1836344 +Ref: Two-way I/O-Footnote-2836531 +Node: TCP/IP Networking836613 +Node: Profiling839731 +Ref: Profiling-Footnote-1848403 +Node: Advanced Features Summary848726 +Node: Internationalization850570 +Node: I18N and L10N852050 +Node: Explaining gettext852737 +Ref: Explaining gettext-Footnote-1858629 +Ref: Explaining gettext-Footnote-2858814 +Node: Programmer i18n858979 +Ref: Programmer i18n-Footnote-1863928 +Node: Translator i18n863977 +Node: String Extraction864771 +Ref: String Extraction-Footnote-1865903 +Node: Printf Ordering865989 +Ref: Printf Ordering-Footnote-1868775 +Node: I18N Portability868839 +Ref: I18N Portability-Footnote-1871295 +Node: I18N Example871358 +Ref: I18N Example-Footnote-1874164 +Node: Gawk I18N874237 +Node: I18N Summary874882 +Node: Debugger876223 +Node: Debugging877246 +Node: Debugging Concepts877687 +Node: Debugging Terms879496 +Node: Awk Debugging882071 +Node: Sample Debugging Session882977 +Node: Debugger Invocation883511 +Node: Finding The Bug884897 +Node: List of Debugger Commands891375 +Node: Breakpoint Control892708 +Node: Debugger Execution Control896402 +Node: Viewing And Changing Data899764 +Node: Execution Stack903138 +Node: Debugger Info904775 +Node: Miscellaneous Debugger Commands908846 +Node: Readline Support913908 +Node: Limitations914804 +Node: Debugging Summary916913 +Node: Arbitrary Precision Arithmetic918192 +Node: Computer Arithmetic919677 +Ref: table-numeric-ranges923443 +Ref: table-floating-point-ranges923936 +Ref: Computer Arithmetic-Footnote-1924594 +Node: Math Definitions924651 +Ref: table-ieee-formats927967 +Ref: Math Definitions-Footnote-1928570 +Node: MPFR features928675 +Node: FP Math Caution930393 +Ref: FP Math Caution-Footnote-1931465 +Node: Inexactness of computations931834 +Node: Inexact representation932794 +Node: Comparing FP Values934154 +Node: Errors accumulate935395 +Node: Getting Accuracy936828 +Node: Try To Round939538 +Node: Setting precision940437 +Ref: table-predefined-precision-strings941134 +Node: Setting the rounding mode942964 +Ref: table-gawk-rounding-modes943338 +Ref: Setting the rounding mode-Footnote-1947269 +Node: Arbitrary Precision Integers947448 +Ref: Arbitrary Precision Integers-Footnote-1950623 +Node: Checking for MPFR950772 +Node: POSIX Floating Point Problems952246 +Ref: POSIX Floating Point Problems-Footnote-1956531 +Node: Floating point summary956569 +Node: Dynamic Extensions958759 +Node: Extension Intro960312 +Node: Plugin License961578 +Node: Extension Mechanism Outline962375 +Ref: figure-load-extension962814 +Ref: figure-register-new-function964379 +Ref: figure-call-new-function965471 +Node: Extension API Description967533 +Node: Extension API Functions Introduction969175 +Node: General Data Types974715 +Ref: General Data Types-Footnote-1983076 +Node: Memory Allocation Functions983375 +Ref: Memory Allocation Functions-Footnote-1987585 +Node: Constructor Functions987684 +Node: Registration Functions991270 +Node: Extension Functions991955 +Node: Exit Callback Functions997170 +Node: Extension Version String998420 +Node: Input Parsers999083 +Node: Output Wrappers1011804 +Node: Two-way processors1016316 +Node: Printing Messages1018581 +Ref: Printing Messages-Footnote-11019752 +Node: Updating ERRNO1019905 +Node: Requesting Values1020644 +Ref: table-value-types-returned1021381 +Node: Accessing Parameters1022317 +Node: Symbol Table Access1023552 +Node: Symbol table by name1024064 +Node: Symbol table by cookie1025853 +Ref: Symbol table by cookie-Footnote-11030038 +Node: Cached values1030102 +Ref: Cached values-Footnote-11033638 +Node: Array Manipulation1033791 +Ref: Array Manipulation-Footnote-11034882 +Node: Array Data Types1034919 +Ref: Array Data Types-Footnote-11037577 +Node: Array Functions1037669 +Node: Flattening Arrays1042167 +Node: Creating Arrays1049143 +Node: Redirection API1053910 +Node: Extension API Variables1056743 +Node: Extension Versioning1057454 +Ref: gawk-api-version1057883 +Node: Extension GMP/MPFR Versioning1059614 +Node: Extension API Informational Variables1061242 +Node: Extension API Boilerplate1062315 +Node: Changes from API V11066289 +Node: Finding Extensions1067861 +Node: Extension Example1068420 +Node: Internal File Description1069218 +Node: Internal File Ops1073298 +Ref: Internal File Ops-Footnote-11084648 +Node: Using Internal File Ops1084788 +Ref: Using Internal File Ops-Footnote-11087171 +Node: Extension Samples1087445 +Node: Extension Sample File Functions1088974 +Node: Extension Sample Fnmatch1096623 +Node: Extension Sample Fork1098110 +Node: Extension Sample Inplace1099328 +Node: Extension Sample Ord1102545 +Node: Extension Sample Readdir1103381 +Ref: table-readdir-file-types1104270 +Node: Extension Sample Revout1105075 +Node: Extension Sample Rev2way1105664 +Node: Extension Sample Read write array1106404 +Node: Extension Sample Readfile1108346 +Node: Extension Sample Time1109441 +Node: Extension Sample API Tests1110789 +Node: gawkextlib1111281 +Node: Extension summary1114199 +Node: Extension Exercises1117901 +Node: Language History1119399 +Node: V7/SVR3.11121055 +Node: SVR41123207 +Node: POSIX1124641 +Node: BTL1126021 +Node: POSIX/GNU1126750 +Node: Feature History1132528 +Node: Common Extensions1148574 +Node: Ranges and Locales1149857 +Ref: Ranges and Locales-Footnote-11154473 +Ref: Ranges and Locales-Footnote-21154500 +Ref: Ranges and Locales-Footnote-31154735 +Node: Contributors1154956 +Node: History summary1160901 +Node: Installation1162281 +Node: Gawk Distribution1163225 +Node: Getting1163709 +Node: Extracting1164672 +Node: Distribution contents1166310 +Node: Unix Installation1172790 +Node: Quick Installation1173472 +Node: Shell Startup Files1175886 +Node: Additional Configuration Options1176975 +Node: Configuration Philosophy1179140 +Node: Non-Unix Installation1181509 +Node: PC Installation1181969 +Node: PC Binary Installation1182807 +Node: PC Compiling1183242 +Node: PC Using1184359 +Node: Cygwin1187574 +Node: MSYS1188673 +Node: VMS Installation1189174 +Node: VMS Compilation1189965 +Ref: VMS Compilation-Footnote-11191194 +Node: VMS Dynamic Extensions1191252 +Node: VMS Installation Details1192937 +Node: VMS Running1195190 +Node: VMS GNV1199469 +Node: VMS Old Gawk1200204 +Node: Bugs1200675 +Node: Bug address1201338 +Node: Usenet1204320 +Node: Maintainers1205324 +Node: Other Versions1206585 +Node: Installation summary1213143 +Node: Notes1214345 +Node: Compatibility Mode1215139 +Node: Additions1215921 +Node: Accessing The Source1216846 +Node: Adding Code1218283 +Node: New Ports1224502 +Node: Derived Files1228990 +Ref: Derived Files-Footnote-11234636 +Ref: Derived Files-Footnote-21234671 +Ref: Derived Files-Footnote-31235269 +Node: Future Extensions1235383 +Node: Implementation Limitations1236041 +Node: Extension Design1237224 +Node: Old Extension Problems1238368 +Ref: Old Extension Problems-Footnote-11239886 +Node: Extension New Mechanism Goals1239943 +Ref: Extension New Mechanism Goals-Footnote-11243307 +Node: Extension Other Design Decisions1243496 +Node: Extension Future Growth1245609 +Node: Notes summary1246445 +Node: Basic Concepts1247620 +Node: Basic High Level1248301 +Ref: figure-general-flow1248583 +Ref: figure-process-flow1249268 +Ref: Basic High Level-Footnote-11252569 +Node: Basic Data Typing1252754 +Node: Glossary1256082 +Node: Copying1287920 +Node: GNU Free Documentation License1325463 +Node: Index1350583 End Tag Table diff --git a/doc/gawk.texi b/doc/gawk.texi index 3be098ba..8a608ed8 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -8105,7 +8105,6 @@ FPAT = "([^,]*)|(\"[^\"]+\")" Finally, the @code{patsplit()} function makes the same functionality available for splitting regular strings (@pxref{String Functions}). - @node Testing field creation @section Checking How @command{gawk} Is Splitting Records @@ -18431,8 +18430,8 @@ whitespace goes into @code{@var{seps}[@var{n}]}, where @var{n} is the return value of @code{split()} (i.e., the number of elements in @var{array}). -The @code{split()} function splits strings into pieces in a -manner similar to the way input lines are split into fields. For example: +The @code{split()} function splits strings into pieces in the same way +that input lines are split into fields. For example: @example split("cul-de-sac", a, "-", seps) @@ -18468,6 +18467,8 @@ are separated by runs of whitespace. Also, as with input field splitting, if @var{fieldsep} is the null string, each individual character in the string is split into its own array element. @value{COMMONEXT} +Additionally, if @var{fieldsep} is a single-character string, that string acts +as the separator, even if its value is a regular expression metacharacter. Note, however, that @code{RS} has no effect on the way @code{split()} works. Even though @samp{RS = ""} causes the newline character to also be an input diff --git a/doc/gawktexi.in b/doc/gawktexi.in index 894fd559..2fffdc73 100644 --- a/doc/gawktexi.in +++ b/doc/gawktexi.in @@ -7704,7 +7704,6 @@ FPAT = "([^,]*)|(\"[^\"]+\")" Finally, the @code{patsplit()} function makes the same functionality available for splitting regular strings (@pxref{String Functions}). - @node Testing field creation @section Checking How @command{gawk} Is Splitting Records @@ -17703,8 +17702,8 @@ whitespace goes into @code{@var{seps}[@var{n}]}, where @var{n} is the return value of @code{split()} (i.e., the number of elements in @var{array}). -The @code{split()} function splits strings into pieces in a -manner similar to the way input lines are split into fields. For example: +The @code{split()} function splits strings into pieces in the same way +that input lines are split into fields. For example: @example split("cul-de-sac", a, "-", seps) @@ -17740,6 +17739,8 @@ are separated by runs of whitespace. Also, as with input field splitting, if @var{fieldsep} is the null string, each individual character in the string is split into its own array element. @value{COMMONEXT} +Additionally, if @var{fieldsep} is a single-character string, that string acts +as the separator, even if its value is a regular expression metacharacter. Note, however, that @code{RS} has no effect on the way @code{split()} works. Even though @samp{RS = ""} causes the newline character to also be an input |