Appending text in a file

Jonathan Hutchins hutchins at tarcanfel.org
Fri Apr 25 22:06:08 CDT 2003


Quoting Steven Elling <ellings at kcnet.com>:  
  
> cat old.ldif |   
> sed -e 's/(dn:.*)/1,ou=contacts,dc=tarcanfel,dc=net/' > new.ldif  
  
Excellent!  So that "1" is what does the trick?  
 
So with sedscr= 
s/,mail=.*// 
s/(dn:.*)/1,ou=contacts,dc=tarcanfel,dc=net/ 
/modify/d 
 
sed -f sedscr old.ldif > new.ldif and I'm all set.  
  
  
  

---------------------------------------------------
This mail sent through tarcanfel's horde/imp system




More information about the Kclug mailing list