10/17 sed/unix script help.
I am trying to modify ldif file so i can actually import it to
my directory server (SunOne). My current ldif files, each entry
start with the following:
dn: cn=firstN LastN, mail=abc@xyz.org
What I need, is change it to
dc: cn=firstN LastN, dc=foo,dc=bar,dc=com
where dc=foo,dc=bar,dc=com is a constant
abc@xyz.org is different every entry
dc: cn=... is always the first line of an entry
each entry is seperated by a blank line.
How do I use sed to replace that mail=abc@xyz.org with
dc=foo,dc=bar,dc=com
thanks in advance |