From: jrunyan.lists@dms.nwcg.gov (Mailing List Account for Jason Runyan) Subject: Re: Appending text in a file Date: Fri, 25 Apr 2003 16:50:26 -0500 Message-Id: <200304251647.55009.JRunyan.Lists@DMS.NWCG.Gov>
On Friday 25 April 2003 15:41, Jonathan Hutchins wrote:
> I have an LDIF file with a bit over 300 entries. I need to append some
> text (",ou=contacts,dc=tarcanfel,dc=net") to each line that begins with
> "dn:".
>
> Surely there's an easy way to script this.
>
> Using sed, I can append text, but only as the next line.
>
> ---------------------------------------------------
> This mail sent through tarcanfel's horde/imp system
create a vim script with "%s/^dn:.*$/&,ou=contacts,dc=tarcanfel,dc=net/g"
-- You've been leading a dog's life. Stay off the furniture.