Unix Shell - Re: SED question: entering a blank line above a character searched

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > December 2007 > Re: SED question: entering a blank line above a character searched





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: SED question: entering a blank line above a character searched
Rakesh Sharma

2007-12-28, 7:31 am


sed -e '
/:/!b
H
s/.*//
x
' < yourfile

On Dec 28, 12:01 pm, Kompu Kid <deg...@hotmail.com> wrote:
> Hello All:
>
> After finding a ":", I would like to enter a blank line above the line
> that the colon is found.
>
> How do I do this with SED?
>
> Deguza


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com