linuxjishu/13830.html target=_blank class=infotextkey>awk正则表达式{}该怎么使用,总是不生效,其实看看man文档就明白了,加上--posix参数即可。
man文档中的解释如下:
r{n,m} One or two numbers inside braces denote an interval expres- sion. If there is one number in the braces, the preceding regular expression r is repeated n times. If there are two numbers separated by a comma, r is repeated n to m times. If there is one number followed by a comma, then r is repeated at least n times. Interval expressions are only available if either --posix or --re-interval is specified on the command line.