有如下的文本内容:
*********
123123
123123
*********
321321
321321
*********
456456
456456
*********
123123
123123
********
匹配123,取出******区间的内容:
awk -vrs="*+" '/123/{print rt$0}' file
说明:
rs the input record separator, by default a newline(\n).
rt the record terminator. gawk sets rt to the input text that matched the character or regular expression specified by rs.
如对本文有疑问,
点击进行留言回复!!
相关文章:
-
-
-
-
-
-
-
-
嵌入式学习经历帖
随着科技的进步,全凭机械结构完成各种运动的时代已经渐行渐远,不过我仍然对于之前创造的各种运动机构着迷。现在技术的...
[阅读全文]
-
-
-
网友评论