Re: to remove leading and trailing blank lines
Davide Brini <[email protected]>
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 01 Jul 2013 10:24:43 -0000, "contact2vikas" <[email protected]> wrote: > Hello, > I want to remove/delete leading and trailing blank lines from a file. Try this: sed ' /./,$b ok d :ok /^\n*$/{ $d N b ok } ' file -- D.