Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Jan 2002 23:03:45 +0100
From:      F.Xavier Noria <fxn@isoco.com>
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:  <DC32C8CEB3F8D311B6B5009027DE5AD503D207BB@stlmail.dra.com> <20020123151746.A75883@mail.k12us.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 23 Jan 2002 15:17:46 -0500
Christopher Weimann <cweimann@k12hq.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020123230345.18d245be.fxn>