Sed can only process a single row of data, but does not process multiple rows before. Many code comments are multiline. you can use commas (,) to process two rule expressions separated by commas, sed starts from the first line that matches the first rule expression to the second rule... information sed can only process a single row of data, but does not process multiple rows before.
Many code comments are multiline and can be processed with commas (,).
Specify two rule expressions separated by commas. sed will start with the first line that matches the first rule expression and end with the line that matches the second rule expression (including this line). For example, the following command prints text blocks starting from the line containing "BEGIN" and ending with a line containing "END:
$ Sed-n-e '/BEGIN/,/END/p'/my/test/file | more
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service