From owner-freebsd-questions@FreeBSD.ORG Thu Oct 28 01:34:57 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 94E5B1065694 for ; Thu, 28 Oct 2010 01:34:57 +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 06D048FC13 for ; Thu, 28 Oct 2010 01:34:56 +0000 (UTC) Received: (qmail 7438 invoked by uid 0); 28 Oct 2010 01:34:56 -0000 Received: from unknown (HELO box543.bluehost.com) (74.220.219.143) by cpoproxy2.bluehost.com with SMTP; 28 Oct 2010 01:34:56 -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=IyHF+tNp1LPqA1Q3fm9k7SNSH4MFZuo/5TZihZX49V3u1qa/rT0WrFlThFw4QEe2yfwa0HaUocjhfNiby+ferfnFuocNpJ5Hnbtd30qI2AuUpvYONukQokQFECp4TyvP; 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 1PBHOJ-0005pq-7J for freebsd-questions@freebsd.org; Wed, 27 Oct 2010 19:34:56 -0600 Received: by kukaburra.hydra (sSMTP sendmail emulation); Wed, 27 Oct 2010 19:29:25 -0600 Date: Wed, 27 Oct 2010 19:29:25 -0600 From: Chad Perrin To: FreeBSD Mailing List Message-ID: <20101028012925.GA68456@guilt.hydra> Mail-Followup-To: FreeBSD Mailing List References: <20101028010447.GA9734@thought.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: 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} 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:34:57 -0000 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 27, 2010 at 06:14:04PM -0700, Nerius Landys wrote: > You mean replace each newline character with two newline characters? >=20 > perl -p -i -e 's/\n/\n\n/g' yourfile.txt The g in that is unnecessary. I'd also be inclined to use $ in the matching part of that regex than \n, and only require one newline character in the substitution part as a result: perl -pie 's/$/\n/' filename.txt Plus . . . I like pie. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --fUYQa+Pmc3FrFX/N Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkzI0fUACgkQ9mn/Pj01uKWZDwCeNlp2mx2K93RVEyaqDj8aSnkH R2cAoLDR7nM99f/2CuMgagcUld55vqfp =TE3N -----END PGP SIGNATURE----- --fUYQa+Pmc3FrFX/N--