From owner-freebsd-questions@FreeBSD.ORG Thu Oct 28 01:16:26 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 9B37B10656A3 for ; Thu, 28 Oct 2010 01:16:26 +0000 (UTC) (envelope-from perrin@apotheon.com) Received: from cpoproxy2-pub.bluehost.com (cpoproxy2-pub.bluehost.com [67.222.39.38]) by mx1.freebsd.org (Postfix) with SMTP id 6468A8FC15 for ; Thu, 28 Oct 2010 01:16:26 +0000 (UTC) Received: (qmail 16300 invoked by uid 0); 28 Oct 2010 01:16:25 -0000 Received: from unknown (HELO box543.bluehost.com) (74.220.219.143) by cpoproxy2.bluehost.com with SMTP; 28 Oct 2010 01:16:25 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=apotheon.com; h=Date:From:To:Subject:Message-ID:Mail-Followup-To:References:Mime-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:X-Identified-User; b=f2QnsQcjD2zWhSkgjNAuqmnToGI1vpsd0vOFJs2nzgJVpU+diKPp2/9JA0+7DlOU9jsv3Yhqq+qhaQVGUSFR5iMGvBWbZUdpHgpmyO3RKGXHNK89+dZ7NLxo/hi61cA3; Received: from c-24-8-180-234.hsd1.co.comcast.net ([24.8.180.234] helo=kukaburra.hydra) by box543.bluehost.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1PBH6O-0004nC-I6; Wed, 27 Oct 2010 19:16:25 -0600 Received: by kukaburra.hydra (sSMTP sendmail emulation); Wed, 27 Oct 2010 19:10:55 -0600 Date: Wed, 27 Oct 2010 19:10:55 -0600 From: Chad Perrin To: FreeBSD Questions , Gary Kline Message-ID: <20101028011055.GA68350@guilt.hydra> Mail-Followup-To: FreeBSD Questions , Gary Kline References: <20101028010447.GA9734@thought.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline In-Reply-To: <20101028010447.GA9734@thought.org> User-Agent: Mutt/1.4.2.3i X-Identified-User: {2737:box543.bluehost.com:apotheon:apotheon.org} {sentby:smtp auth 24.8.180.234 authed with ren@apotheon.org} Cc: 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 01:16:26 -0000 --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 27, 2010 at 06:04:50PM -0700, 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? perl -e 'while (<>) { s/$/\n/; print; }' You could also open the file in vi or Vim and give it this command: :%s/$/^M/ Note that you don't type in that ^M by using the ^ and M keys on the keyboard. Instead, you first type ctrl-v then press the Enter key. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkzIzZ8ACgkQ9mn/Pj01uKXs2wCfa7RQAdouWfpFd28WMW9mcBvf tEkAoIZ7e0gIbH2+zI9jeHNHiygwQpuP =MS0w -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO--