From owner-freebsd-questions Wed Jan 23 14: 1:59 2002 Delivered-To: freebsd-questions@freebsd.org Received: from smtp04.retemail.es (smtp04.iddeo.es [62.81.186.14]) by hub.freebsd.org (Postfix) with ESMTP id 3F73B37B416 for ; Wed, 23 Jan 2002 14:01:56 -0800 (PST) Received: from conway.localdomain ([62.174.68.144]) by smtp04.retemail.es (InterMail vM.5.01.03.02 201-253-122-118-102-20010403) with SMTP id <20020123220154.CFWN1019.smtp04.retemail.es@conway.localdomain> for ; Wed, 23 Jan 2002 23:01:54 +0100 Date: Wed, 23 Jan 2002 23:03:45 +0100 From: F.Xavier Noria To: questions@FreeBSD.ORG Subject: Re: Text editiing.... possibility for perl? Message-Id: <20020123230345.18d245be.fxn@isoco.com> In-Reply-To: <20020123151746.A75883@mail.k12us.com> References: <20020123151746.A75883@mail.k12us.com> X-Mailer: Sylpheed version 0.7.0 (GTK+ 1.2.10; i386--freebsd4.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, 23 Jan 2002 15:17:46 -0500 Christopher Weimann wrote: : awk -F, '{ print $1"-"$2"\t"$3"\t"$4"\t"$5"."$6"."$7"."$8 }' infile > outfile Ah, cleaner. In Perl the analogous one liner would be perl -nlaF, -e 'print "$F[0]-$F[1]\t$F[2]\t$F[3]\t$F[4].$F[5].$F[6].$F[7]"' infile > outfile -- fxn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message