From owner-freebsd-questions@FreeBSD.ORG Thu Oct 28 15:20:27 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADC59106564A for ; Thu, 28 Oct 2010 15:20:27 +0000 (UTC) (envelope-from ws@au.dyndns.ws) Received: from ipmail07.adl2.internode.on.net (ipmail07.adl2.internode.on.net [150.101.137.131]) by mx1.freebsd.org (Postfix) with ESMTP id 31AC88FC18 for ; Thu, 28 Oct 2010 15:20:26 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApEBAMswyUyWZWdv/2dsb2JhbAAH4hGFSAQ Received: from ppp103-111.static.internode.on.net (HELO [192.168.1.144]) ([150.101.103.111]) by ipmail07.adl2.internode.on.net with ESMTP; 29 Oct 2010 01:50:25 +1030 From: Wayne Sierke To: FreeBSD Mailing List In-Reply-To: <1288241282.32933.82.camel@predator-ii.buffyverse> References: <20101028010447.GA9734@thought.org> <1288241282.32933.82.camel@predator-ii.buffyverse> Content-Type: text/plain; charset="ISO-8859-1" Date: Fri, 29 Oct 2010 01:50:22 +1030 Message-ID: <1288279222.32933.117.camel@predator-ii.buffyverse> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Subject: Re: okay, time to ask the wizards. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 15:20:27 -0000 On Thu, 2010-10-28 at 15:18 +1030, Wayne Sierke wrote: > > On Wed, Oct 27, 2010 at 6:04 PM, Gary Kline wrote: > > > > > I've got a very large file with paragraphs separated only by "\n". > > > How do I put a blank line _after_ each newline? > 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