- 论坛徽章:
- 0
|
谢谢学习了这个选项,以前还真不知道。 再问一下,我查看了man awk
里面关于这个选项:
--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.
意思就是gawk如果不用这个选项,FS就不按正则对待了。
可如果看FS部分:
Fields
As each input record is read, gawk splits the record into fields, using the value of the FS variable as the field separator. If FS is a single character,
fields are separated by that character. If FS is the null string, then each individual character becomes a separate field. Otherwise, FS is expected to be a
full regular expression.
这不冲突了么? |
|