I have a file aa
containing the following:
11
22
33
44
If I would like to delete one line matching 22, I use:
sed "/22/d" aa
And I get 22 removed to show as:
11
33
44
How to delete n lines starting from a matching pattern? For example, say, I would like to delete 2 lines from matching 22 to get the content as:
11
44
It's different from sed or awk: delete n lines following a pattern , as the solution there does not seem to work on Solaris