Delete n lines after a pattern match in shell using sed command

by rajesh 2014-05-13 11:55:01

Using the following command will delte exact number of lines in file after a defined pattern match
sed -e '/pattern/,+5d' filename
This command with remove 5 lines including the line that matches the search.
1623
like
0
dislike
0
mail
flag

You must LOGIN to add comments