Hello,
I want to write the output of ldapadd to a file. Now, ldapadd uses stdout to show which is the dn that should be added, and stderr, if anything didn't work correctly.
On my screen, it looks like this:
adding new entry cn=... <written to stdout>
ldap_add_s: Object class violation <written to stderr>
adding new entry cn=... <written to stdout>
ldap_add_s: Already exists <written to stderr>
...
When I redirect it to a file using
ldapadd ... > file 2>&1, the output is some kind of bundled:
adding new entry cn=...
adding new entry cn=...
ldap_add_s: Object class violation
ldap_add_s: Already exists
Someone told me that stdout is buffered, stderr not. What can I do to get the result printed on my screen written in a file?
Thanks,
Bettina
I want to write the output of ldapadd to a file. Now, ldapadd uses stdout to show which is the dn that should be added, and stderr, if anything didn't work correctly.
On my screen, it looks like this:
adding new entry cn=... <written to stdout>
ldap_add_s: Object class violation <written to stderr>
adding new entry cn=... <written to stdout>
ldap_add_s: Already exists <written to stderr>
...
When I redirect it to a file using
ldapadd ... > file 2>&1, the output is some kind of bundled:
adding new entry cn=...
adding new entry cn=...
ldap_add_s: Object class violation
ldap_add_s: Already exists
Someone told me that stdout is buffered, stderr not. What can I do to get the result printed on my screen written in a file?
Thanks,
Bettina