开发者

sed + need to remove each line in file that begin with ###

开发者 https://www.devze.com 2023-01-04 03:08 出处:网络
How to remove line that begins with three # For example need to delete all the following lines: from file

How to remove line that begins with three #

For example need to delete all the following lines: from file

1 ### bla bla bal

2 ###blablabla

开发者_StackOverflow3 ### blabla

. . .

THX Yael


cat file | sed '/^###/d'


you can use awk as well

awk '!/^[ \t]*###/' file
0

精彩评论

暂无评论...
验证码 换一张
取 消