Date: Fri, 29 Oct 2010 01:50:22 +1030 From: Wayne Sierke <ws@au.dyndns.ws> To: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: okay, time to ask the wizards. Message-ID: <1288279222.32933.117.camel@predator-ii.buffyverse> In-Reply-To: <1288241282.32933.82.camel@predator-ii.buffyverse> References: <20101028010447.GA9734@thought.org> <AANLkTikF%2BkB5v9pBn5hVMUg7wS78fbO%2BU9G8abNeQA%2BZ@mail.gmail.com> <1288241282.32933.82.camel@predator-ii.buffyverse>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2010-10-28 at 15:18 +1030, Wayne Sierke wrote:
> > On Wed, Oct 27, 2010 at 6:04 PM, Gary Kline <kline@thought.org> wrote:
> >
> > > I've got a very large file with paragraphs separated only by "\n".
> > > How do I put a blank line _after_ each newline?
<snip>
> In this particular case however, sed does offer the "pièce de
> résistance":
>
> sed G
Mea culpa. Someone contacted me off-list querying the validity of my sed
statement which highlighted that my solution description was overly
terse.
Of course what I was suggesting was:
sed G sourcefile
and practically used as something like:
sed G sourcefile > newfile
or:
sed -i .orig -e G sourcefile
e.g.:
%cat > sourcefile
Line one.
Line two.
Line three.
%D
%sed G sourcefile
Line one.
Line two.
Line three.
%
Wayne
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1288279222.32933.117.camel>
