From owner-freebsd-questions Fri Feb 1 17:46:24 2002 Delivered-To: freebsd-questions@freebsd.org Received: from out020.verizon.net (out020pub.verizon.net [206.46.170.176]) by hub.freebsd.org (Postfix) with ESMTP id 11B9937B41C for ; Fri, 1 Feb 2002 17:45:54 -0800 (PST) Received: from verizon.net ([199.171.52.20]) by out020.verizon.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20020201170905.FEEV22012.out020.verizon.net@verizon.net>; Fri, 1 Feb 2002 11:09:05 -0600 Message-ID: <3C5ACB24.2070504@verizon.net> Date: Fri, 01 Feb 2002 12:06:44 -0500 From: Simon Morton Reply-To: smorton@acm.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.7) Gecko/20011221 X-Accept-Language: en,pdf,zh-CN,de-DE,zh-TW,zh, zh- MIME-Version: 1.0 To: Eric Six Cc: "'questions@FreeBSD.ORG'" Subject: Re: Perl question... References: Content-Type: text/plain; charset=us-ascii; format=flowed 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 From the (tcsh) command line: % foreach f (`find dir -type f`) foreach? printf '1\ni\n$TTL value;\n.\nw\nq\n' | ed $f foreach? end % Simon Eric Six wrote: > > Though this doesn't pertain to BSD, except for the fact I am running this on > freebsd ;), I wanted to run it by the list as I have gotten wonderful > answers before! > > I have about 400 primary and 300 secondary DNS records that I have migrated > from a bind4 server. I need to add a '$TTL value;' to the first line of all > my zone files... > > I have found ways to append lines to the file, but not to create a new one > at the very beginning. Also, any ideas on how to automate doing this to all > the files in each dir? > > > Tia! > Eric > > Eric Six erics@sirsi.com > Network Specialist > SIRSI > v : 1.800.372.8527.356 > f : 314.993.8927 > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > -- http://www.SimonMorton.com smorton at acm dot org \rm -rf /bin/laden To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message