- 论坛徽章:
- 0
|
本帖最后由 crowsy001 于 2010-04-11 22:06 编辑
还请讲解一下,没看明白
alexandnpu 发表于 2010-04-11 17:28 ![]()
发现不加,符号也可以。 man 也会误导, 实践。。
man awk 看看, 我这里支持。
{m,}
Specifies that a string matches if at least m occurrences of the pattern are within the string. The command line:
awk '/t{2,}/' testfile
prints to standard output:
smitters, alexis
{m,n}
Specifies that a string matches if between m and n, inclusive, occurrences of the pattern are within the string (
where m <= n). The command line:
awk '/er{1, 2}/' testfile
prints to standard output:
smithern, harry
smithern, anne
smitters, alexis |
|