GAWK的兼容模式,传统模式

 

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的兼容模式,传统模式)