The line sed + delete starting with ### includes a space between the beginning of the line and ###

I have:

sed -i '/^###/d' file

How to change sed syntax to react like awk syntax?

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

for example sed need to delete a line starting with a space or TAB, and then ###?

+2
source share
1 answer
sed -i '/^[ \t]*###/d' file
+2
source

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


All Articles