So do your input files only have one (3 line) entry per file? If not, is there anything in the input file that separates records, or is it just that each entry is 3 lines?
Are the input lines always in the same order?
Are the headers constant, or are the headers derived from the input?
Does having no space before the colon in the input cause the header and the data field for that line to have a period added added to the end of that field on output? And, does having a space before the colon suppress the period? If not, what is the significance of sometimes having a space before the colon?
Why is there a space in the output before "Andy."?
What determines the number of spaces between output fields?
Did you intend for the header for each field to be aligned with the data under that header?
I downloaded your file. In your first message in this thread you said
Firstname: andy
Lastname: Mervyn
Phone : 12345
But, in the file I downloaded, the first line is "version: 1", the string "stname" never appears, the string "hone" never appears, every line ends with a carriage return and a newline, and there are 2,706 pairs of lines of the form:
separated by empty lines (except for the carriage returns).
The first line in each pair seems to have a different uid= entry in each parir. In the 2,706 pairs, there are two different values for the first dc= entry in the line.
The second line in all 2,706 pairs is identical.
I have no idea what you expect to get from this 200,000+ byte file. I'm afraid I can't help you.
You can ignore "version: 1", and also you can remove double quotes for each dn: value.
Remaining all are correct.Since it is in ldap protocol langugage it might be starnage to you.There is no typo or errors.In my first post i have gave you sample example and i said 3 lines in single file.But its wrong.