Appending text in a file
Jonathan Hutchins
hutchins at tarcanfel.org
Sun Apr 27 02:20:25 CDT 2003
Quoting Steven Elling <ellings at kcnet.com>:
> > s/,mail=.*//
> What is your goal here? Remember, . (dot) refers to any character and with *
> (astriks) following the dot this regex will match 'mail=' followed by zero or
> more characters. In effect, this substitution will remove everything from
> 'mail=' to the end of the line. If that is your goal, good.
Yup. If there's an email address in a record, mozilla/netscape appends it to
the dn: line. You could just do a search-and-replace on that for this project,
but it leaves the "mail=" string off if the address is blank.
> > /modify/d
> I haven't seen this before. I take it you want to match lines containing
> 'modify' and then delete the whole line. Am I right?
Correct - I think it's "modifytimestamp= 0Z", but "modify" was a good enough
mnemonic.
---------------------------------------------------
This mail sent through tarcanfel's horde/imp system
More information about the Kclug
mailing list