[SLL] sed to delete blank line above and after a regex?

Jeremy C. Reed reed at reedmedia.net
Fri Mar 21 13:51:39 PDT 2008


Can someone share a sed example of deleting a blank line above and after a 
regex?

(Or just delete one line above and one line after a regex?)

file is like this

%

but I don't want blank lines

%

before and after each percent sign

%


Any ideas on how to do that with sed?

  Jeremy C. Reed


More information about the linux-list mailing list