Copyright (C) 2000-2012 |
GNU Info (gawk.info)POSIX/GNUExtensions in `gawk' Not in POSIX `awk' ======================================= The GNU implementation, `gawk', adds a large number of features. This minor node lists them in the order they were added to `gawk'. They can all be disabled with either the `--traditional' or `--posix' options (Note: Command-Line Options.). Version 2.10 of `gawk' introduced the following features: * The `AWKPATH' environment variable for specifying a path search for the `-f' command-line option (*note Command-Line Options: Options.). * The `IGNORECASE' variable and its effects (Note: Case Sensitivity in Matching.). * The `/dev/stdin', `/dev/stdout', `/dev/stderr' and `/dev/fd/N' special file names (Note: Special File Names in `gawk'. ). Version 2.13 of `gawk' introduced the following features: * The `FIELDWIDTHS' variable and its effects (Note: Reading Fixed-Width Data.). * The `systime' and `strftime' built-in functions for obtaining and printing timestamps (*note Using `gawk''s Timestamp Functions: Time Functions.). * The `-W lint' option to provide error and portability checking for both the source code and at runtime (*note Command-Line Options: Options.). * The `-W compat' option to turn off the GNU extensions (Note: Command-Line Options.). * The `-W posix' option for full POSIX compliance (Note: Command-Line Options.). Version 2.14 of `gawk' introduced the following feature: * The `next file' statement for skipping to the next data file (Note: Using `gawk''s `nextfile' Statement.). Version 2.15 of `gawk' introduced the following features: * The `ARGIND' variable, which tracks the movement of `FILENAME' through `ARGV' (Note: Built-in Variables). * The `ERRNO' variable, which contains the system error message when `getline' returns -1 or when `close' fails (Note: Built-in Variables). * The `/dev/pid', `/dev/ppid', `/dev/pgrpid', and `/dev/user' file name interpretation (Note: Special File Names in `gawk'. ). * The ability to delete all of an array at once with `delete ARRAY' (Note: The `delete' Statement.). * The ability to use GNU-style long-named options that start with `--' (Note: Command-Line Options.). * The `--source' option for mixing command-line and library file source code (Note: Command-Line Options.). Version 3.0 of `gawk' introduced the following features: * `IGNORECASE' changed, now applying to string comparison as well as regexp operations (*note Case Sensitivity in Matching: Case-sensitivity.). * The `RT' variable that contains the input text that matched `RS' (Note: How Input Is Split into Records.). * Full support for both POSIX and GNU regexps (Note: Regular Expressions.). * The `gensub' function for more powerful text manipulation (Note: String Manipulation Functions.). * The `strftime' function acquired a default time format, allowing it to be called with no arguments (Note: Using `gawk''s Timestamp Functions.). * The ability for `FS' and for the third argument to `split' to be null strings (Note: Making Each Character a Separate Field. ). * The ability for `RS' to be a regexp (Note: How Input Is Split into Records.). * The `next file' statement became `nextfile' (Note: Using `gawk''s `nextfile' Statement.). * The `--lint-old' option to warn about constructs that are not available in the original Version 7 Unix version of `awk' (Note: Major Changes Between V7 and SVR3.1.1.). * The `-m' option and the `fflush' function from the Bell Laboratories research version of `awk' (Note: Command-Line Options.; also Note: Input/Output Functions. ). * The `--re-interval' option to provide interval expressions in regexps (Note: Regular Expression Operators.). * The `--traditional' option was added as a better name for `--compat' (Note: Command-Line Options.). * The use of GNU Autoconf to control the configuration process (Note: Compiling `gawk' for Unix.). * Amiga support (Note: Installing `gawk' on an Amiga. ). Version 3.1 of `gawk' introduced the following features: * The `BINMODE' special variable for non-POSIX systems, which allows binary I/O for input and/or output files (Note: Using `gawk' on PC Operating Systems.). * The `LINT' special variable, which dynamically controls lint warnings (Note: Built-in Variables). * The `PROCINFO' array for providing process-related information (Note: Built-in Variables). * The `TEXTDOMAIN' special variable for setting an application's internationalization text domain (Note: Built-in Variables, and Note: Internationalization with `gawk'. * The ability to use octal and hexadecimal constants in `awk' program source code (*note Octal and Hexadecimal Numbers: Non-decimal-numbers.). * The `|&' operator for two-way I/O to a coprocess (Note: Two-Way Communications with Another Process.). * The `/inet' special files for TCP/IP networking using `|&' (Note: Using `gawk' for Network Programming.). * The optional second argument to `close' that allows closing one end of a two-way pipe to a coprocess (Note: Two-Way Communications with Another Process.). * The optional third argument to the `match' function for capturing text-matching subexpressions within a regexp (Note: String Manipulation Functions.). * Positional specifiers in `printf' formats for making translations easier (Note: Rearranging `printf' Arguments.). * The `asort' function for sorting arrays (Note: Sorting Array Values and Indices with `gawk'.). * The `bindtextdomain' and `dcgettext' functions for internationalization (*note Internationalizing `awk' Programs: Programmer i18n.). * The `extension' built-in function and the ability to add new built-in functions dynamically (Note: Adding New Built-in Functions to `gawk'.). * The `mktime' built-in function for creating timestamps (Note: Using `gawk''s Timestamp Functions.). * The `and', `or', `xor', `compl', `lshift', `rshift', and `strtonum' built-in functions (Note: Using `gawk''s Bit Manipulation Functions.). * The support for `next file' as two words was removed completely (Note: Using `gawk''s `nextfile' Statement.). * The `--dump-variables' option to print a list of all global variables (Note: Command-Line Options.). * The `--gen-po' command-line option and the use of a leading underscore to mark strings that should be translated (Note: Extracting Marked Strings.). * The `--non-decimal-data' option to allow non-decimal input data (Note: Allowing Non-Decimal Input Data.). * The `--profile' option and `pgawk', the profiling version of `gawk', for producing execution profiles of `awk' programs (Note: Profiling Your `awk' Programs.). * The `--enable-portals' configuration option to enable special treatment of pathnames that begin with `/p' as BSD portals (Note: Using `gawk' with BSD Portals.). * The use of GNU Automake to help in standardizing the configuration process (Note: Compiling `gawk' for Unix.). * The use of GNU `gettext' for `gawk''s own message output (Note: `gawk' Can Speak Your Language.). * BeOS support (Note: Installing `gawk' on BeOS.). * Tandem support (Note: Installing `gawk' on a Tandem. ). * The Atari port became officially unsupported (Note: Installing `gawk' on the Atari ST.). * The source code now uses new-style function definitions, with `ansi2knr' to convert the code on systems with old compilers. automatically generated by info2www version 1.2.2.9 |