Sed + needs to delete every line in the file starting with C ###

How to delete a line that starts with three #

For example, you need to delete all of the following lines: from a file

1 ### bla bla bal

2 ### blablabla

3 ### blabla

. ,.

thanks Yael

+3
source share
2 answers

you can also use awk

awk '!/^[ \t]*###/' file
+3
source
cat file | sed '/^###/d'
+6
source

Source: https://habr.com/ru/post/1751175/


All Articles