Answer the question
In order to leave comments, you need to log in
How to remove a line from a file above or below a searched value?
The command deletes the line with the value (pattern)
sed '/pattern/d' file.txt
How to delete the line above and below the line with the given value, but leave the searched line intact? (in separate commands)
Maybe some other utility is needed?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question