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作为GNU项目中AWK编程语言的实现,详细探讨了其提供的多种运行模式,包括POSIX兼容模式、传统模式等,并解释了这些模式下对语言特性的限制。
1194

被折叠的 条评论
为什么被折叠?



