From owner-freebsd-questions Wed Jan 23 12:17:59 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.k12us.com (mail.k12us.com [65.112.222.15]) by hub.freebsd.org (Postfix) with SMTP id A326A37B400 for ; Wed, 23 Jan 2002 12:17:56 -0800 (PST) Received: (qmail 99099 invoked by uid 1001); 23 Jan 2002 20:17:46 -0000 Date: Wed, 23 Jan 2002 15:17:46 -0500 From: Christopher Weimann To: Eric Six Cc: questions@FreeBSD.ORG Subject: Re: Text editiing.... possibility for perl? Message-ID: <20020123151746.A75883@mail.k12us.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from erics@sirsi.com on Wed, Jan 23, 2002 at 01:34:27PM -0600 X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) 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, Jan 23, 2002 at 01:34:27PM -0600, Eric Six wrote: > I have a few questions.. I need to edit a few files with a bunch > text. I am creating forward and reverse zone file for a private > network and I want to automate this tedious process.. Here is what I > have. > > I create a basic template in excel, it is as follows; > > host15,1,in,a,10,50,15,1 > host15,2,in,a,10,50,15,2 > host15,3,in,a,10,50,15,3 > > > What I need done after this file is populated is make it look like > this; > host15-1 in a 10.50.15.1 > host15-2 in a 10.50.15.2 > host15-3 in a 10.50.15.3 > awk -F, '{ print $1"-"$2"\t"$3"\t"$4"\t"$5"."$6"."$7"."$8 }' infile > outfile To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message