Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize interval value in awk

Shulou Source: shulou.com Published: 2022-06-03 07:16:57 11月15日 Update

This article will explain in detail how to realize the interval value of awk. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

There is the following text content:

*********

123123

123123

*********

321321

321321

*********

456456

456456

*********

123123

123123

********

Match 123, take out the contents of * range:

Awk-vRS= "* +" / 123 / {print RT$0} 'file

Description:

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.

This is the end of the article on "how to achieve interval values in awk". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Tags: Intervals content articles more good practical text articles knowledge references help related Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Redmi OPPO Reno MariaDB vpn