(gawk.info.gz) POSIX/GNU

Info Catalog (gawk.info.gz) BTL (gawk.info.gz) Language History (gawk.info.gz) Common Extensions
 
 A.5 Extensions in `gawk' Not in POSIX `awk'
 ===========================================
 
 The GNU implementation, `gawk', adds a large number of features.  They
 can all be disabled with either the `--traditional' or `--posix' options
 ( Options).
 
    A number of features have come and gone over the years. This minor
 node summarizes the additional features over POSIX `awk' that are in
 the current version of `gawk'.
 
    * Additional built-in variables:
 
         - The `ARGIND' `BINMODE', `ERRNO', `FIELDWIDTHS', `FPAT',
           `IGNORECASE', `LINT', `PROCINFO', `RT', and `TEXTDOMAIN'
           variables ( Built-in Variables).
 
    * Special files in I/O redirections:
 
         - The `/dev/stdin', `/dev/stdout', `/dev/stderr' and
           `/dev/fd/N' special file names ( Special Files).
 
         - The `/inet', `/inet4', and `/inet6' special files for TCP/IP
           networking using `|&' to specify which version of the IP
           protocol to use.  ( TCP/IP Networking).
 
    * Changes and/or additions to the language:
 
         - The `\x' escape sequence ( Escape Sequences).
 
         - Full support for both POSIX and GNU regexps ( Regexp).
 
         - The ability for `FS' and for the third argument to `split()'
           to be null strings ( Single Character Fields).
 
         - The ability for `RS' to be a regexp ( Records).
 
         - The ability to use octal and hexadecimal constants in `awk'
           program source code ( Nondecimal-numbers).
 
         - The `|&' operator for two-way I/O to a coprocess (
           Two-way I/O).
 
         - Indirect function calls ( Indirect Calls).
 
         - Directories on the command line produce a warning and are
           skipped ( Command line directories).
 
    * New keywords:
 
         - The `BEGINFILE' and `ENDFILE' special patterns.  (
           BEGINFILE/ENDFILE).
 
         - The ability to delete all of an array at once with `delete
           ARRAY' ( Delete).
 
         - The `nextfile' statement ( Nextfile Statement).
 
         - The `switch' statement ( Switch Statement).
 
    * Changes to standard `awk' functions:
 
         - The optional second argument to `close()' that allows closing
           one end of a two-way pipe to a coprocess ( Two-way
           I/O).
 
         - POSIX compliance for `gsub()' and `sub()'.
 
         - The `length()' function accepts an array argument and returns
           the number of elements in the array ( String
           Functions).
 
         - The optional third argument to the `match()' function for
           capturing text-matching subexpressions within a regexp (
           String Functions).
 
         - Positional specifiers in `printf' formats for making
           translations easier ( Printf Ordering).
 
         - The `split()' function's additional optional fourth argument
           which is an array to hold the text of the field separators.
           ( String Functions).
 
    * Additional functions only in `gawk':
 
         - The `and()', `compl()', `lshift()', `or()', `rshift()', and
           `xor()' functions for bit manipulation ( Bitwise
           Functions).
 
         - The `asort()' and `asorti()' functions for sorting arrays
           ( Array Sorting).
 
         - The `bindtextdomain()', `dcgettext()' and `dcngettext()'
           functions for internationalization ( Programmer i18n).
 
         - The `extension()' built-in function and the ability to add
           new functions dynamically ( Dynamic Extensions).
 
         - The `fflush()' function from Brian Kernighan's version of
           `awk' ( I/O Functions).
 
         - The `gensub()', `patsplit()', and `strtonum()' functions for
           more powerful text manipulation ( String Functions).
 
         - The `mktime()', `systime()', and `strftime()' functions for
           working with timestamps ( Time Functions).
 
    * Changes and/or additions in the command-line options:
 
         - The `AWKPATH' environment variable for specifying a path
           search for the `-f' command-line option ( Options).
 
         - The ability to use GNU-style long-named options that start
           with `--' and the `--characters-as-bytes', `--compat',
           `--dump-variables', `--exec', `--gen-pot', `--lint',
           `--lint-old', `--non-decimal-data', `--posix', `--profile',
           `--re-interval', `--sandbox', `--source', `--traditional', and
           `--use-lc-numeric' options ( Options).
 
    * Support for the following obsolete systems was removed from the
      code and the documentation for `gawk' version 4.0:
 
         - Amiga
 
         - Atari
 
         - BeOS
 
         - Cray
 
         - MIPS RiscOS
 
         - MS-DOS with the Microsoft Compiler
 
         - MS-Windows with the Microsoft Compiler
 
         - NeXT
 
         - SunOS 3.x, Sun 386 (Road Runner)
 
         - Tandem (non-POSIX)
 
         - Prestandard VAX C compiler for VAX/VMS
 
 
 
Info Catalog (gawk.info.gz) BTL (gawk.info.gz) Language History (gawk.info.gz) Common Extensions
automatically generated by info2html