Am Mittwoch, 01. Februar 2017 19:21 CET, Jephte Clain jephte.clain@univ-reunion.fr schrieb:
hello,
he asked for a quick and dirty way with bash, so that's what I gave him.
Sorry, but the OP did _not_ ask for a "quick and dirty" solution, he asked for an existing script. "Quick and dirty" is not what you want as a system administrator.
however, I'm curious: can you give me an example of input my script can't handle?
Yes, of course. - It will fail as soon as the value of the cn attribute doesn't fit in a single line (happens more often than you might expect). - It wil fail for entries with more than one cn attribute, generating more than one displayName attribute per entry.
Cheers, Ralf Mattes