Search Results

Search: Posts Made By: craftereric
23,996
Posted By craftereric
sed to find pattern and delete line before and after
I have the following file:

line1
line2
MATCH
line3
line4

I need to find the pattern, "MATCH" and delete the line before and after MATCH. So the result should be

line1
MATCH
lline4...
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 01:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy