教程集 www.jiaochengji.com
教程集 >  脚本编程  >  shell  >  正文 有关awk正则表达式中{}的使用方法

有关awk正则表达式中{}的使用方法

发布时间:2014-09-19   编辑:jiaochengji.com
awk正则表达式{}该怎么使用,总是不生效,其实看看man文档就明白了,加上--posix参数即可。

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.

您可能感兴趣的文章:
有关awk正则表达式中{}的使用方法
awk单行脚本快速参考
awk编程基础知识(5)-规则表达式
awk 获取ip地址的方法分享(awk实例)
shell 字符串的查找与替换
awk基础知识(8)-运算符
正则表达式使用详解
awk基础知识(1)-使用规则
如何在shell脚本里传递一个变量给awk
shell命令获取linux下eth0的IP地址

[关闭]
~ ~