Tuesday, 6 August 2013

how to delete a particular line and also the line immediately above it

how to delete a particular line and also the line immediately above it

I found so many examples using sed/grep to able to delete a particular
line in a text file but I want to be able to delete that line and the line
immediately above it. Any ideas as where i should start?
i have tried sed '/pattern/d' ./file which only delete a particular line

No comments:

Post a Comment