I'm hitting a brick wall, I have huge ldif files that I'm trying to sanitize and can do it all with SED except one thing.
I have a publicKey attribute in binary that can be one line or multiple lines.
I'm trying to remove publicKey: and stop at sn (the next attribute). Even with word Wrap turned of it can span multiple lines.
I can figure out how to remove them both but not just the one when it is on multiple lines (2 to 4 lines).
I don't know if I explained it well enough, please let me know.
Also, here are some solutions if publickey: and sn: don't always start at beginning of the line, eg:
before
keyline publickey:ahdkhafdhfasdahfdhhasdfdsfadf
daybutbsfdfklajdak
jdafndnfkd;nfaksnaklsnfnfakfsldnansn:keepthisattribute and
the rest of
the doc
Ygor,
That worked perfectly and I was able to modify it when the publicKey migrated in the file today.
Chubler, I'm going to try your's tomorrow, got a file with one line....