yael
yael

Reputation: 2913

sed + delete line that begin with ### include space between line beginning and ###

I have:

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

How to change the sed syntax in order to react like awk syntax?

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

for example sed need to delete line that begin with space or TAB and then ###?

Upvotes: 2

Views: 2647

Answers (1)

unbeli
unbeli

Reputation: 30228

sed -i '/^[ \t]*###/d' file

Upvotes: 2

Related Questions