`

GAWK的兼容模式,传统模式

    博客分类:
  • awk
阅读更多

 

Gawk  is  the  GNU  Project’s implementation of the AWK programming language. 

 

-W posix

       --posix

              This turns on compatibility mode, with the following additional restrictions:

 

              · \x escape sequences are not recognized.

 

              · Only space and tab act as field separators when FS is set to a single space, newline does not.

 

              · You cannot continue lines after ?  and :.

 

              · The synonym func for the keyword function is not recognized.

 

              · The operators ** and **= cannot be used in place of ^ and ^=.

 

              · The fflush() function is not available.

-W -re-interval

--re-interval

 Enable the use of interval expressions in regular expression matching (see Regular Expressions, below).  Interval expressions were

 not traditionally available in the AWK language.  The POSIX standard added them, to make awk and egrep consistent with each other.

 However, their use is likely to break old AWK programs, so gawk only provides them if they are requested with this option, or when

 --posix is specified.

 

 

-W compat

       -W traditional

       --compat

       --traditional

              Run in compatibility mode.  In compatibility mode, gawk behaves identically to UNIX awk; none of the GNU-specific  extensions  are

              recognized.   The  use  of  --traditional  is  preferred over the other forms of this option.  See GNU EXTENSIONS, below, for more

              information.

 

分享到:
评论

相关推荐

    gawk编程入门---chinaitlab

    其中,gawk是基于POSIX awk的,且兼容性强。在大多数现代Unix或Linux系统中,当我们执行`awk`命令时,实际上是在调用`/bin/gawk`。关于gawk的详细信息,可以通过命令`man gawk`或`info gawk`来查阅。 Awk是一种强大...

    AWK中文详细描述

    - -c 或 --traditional 用于开启兼容模式,使Gawk表现得像传统的Brian Kernighan的awk。 - -C 或 --copyright 打印Gawk的版权信息。 - -d 或 --dump-variables 用于打印已排序的全局变量列表。 - -D 或 --debug 启用...

    awk学习笔记

    - `-W compat` 或 `--compat`、`-W traditional` 或 `--traditional`:使gawk以兼容模式运行,忽略所有扩展功能。 - `-W copyleft` 或 `--copyleft`、`-W copyright` 或 `--copyright`:打印版权信息。 - `-W help` ...

    linux-awklinux-awk

    - `-W compact` 或 `--compat`:在兼容模式下运行 Awk。 - `-W copyleft` 或 `--copyleft`:打印简短的版权信息。 - `-W help` 或 `--help`:打印所有 Awk 选项及其简短说明。 - `-W lint` 或 `--lint`:打印不能向...

    awk手册.pdf (高清)

    - **-W compat 或 --compat**:以兼容模式运行awk,忽略所有扩展功能,使awk的行为与标准awk一致。 - **-W copyleft 或 --copyleft**:打印简短的版权信息。 - **-W help 或 --help**:打印awk的所有选项及其简短...

    awk4j (AWK for Java Platform)-开源

    `awk4j` 的设计目标可能是在保留GAWK兼容性的同时,引入新的特性和优化。 其中一项关键特性是动态和静态类型的结合。在传统的AWK中,所有变量默认为动态类型,但在`awk4j` 中,开发人员可以选择使用静态类型来提高...

Global site tag (gtag.js) - Google Analytics