Re: capture output of an ldapmodify command



Sorry to ask the silly questiions, a few things to check out.
- Sure you have the right path? Ie try the full pathing to the comand.
- Do a df, make sure did not use up all your space before you start
your log....
- Simple re-direct, /home/fun/foo.sh 2> /tmp/foo.err.log 1>
/tmp/foo.err.log
- Does that user have the rights to the dir.

Ok, some thing I do, example useing fun, in ur case
echo "fun" |grep fun && echo "Found fun"
Or
echo "foobar" |grep fun || echo "no fun"

But, in your example, I see two lines, Is that the issue problem?
? What does norm output look like ?

2 cents, JB...



Anton wrote:
hello- Im encountering a strange problem Im sure Im overlooking the
problem....

i am performing an ldapmodify command on an ldif file and want to
capture the output:

IE: this is what is seen on the command line:


modifying entry: entryname
ldap_modify: object exists

modifying entry: entryname
ldap_modify: no such object

***************************************

I want that EXACT output to be piped into a file--- BUT no matter what
I do i get a file that looks like this:


modifying entry: entryname
modifying entry: entryname

ldap_modify: object exists
ldap_modify: no such object

the above occurs when i direct stderr and stdout to the same file-- so
Im assuming stdout is being reported all at once then the stderr... is
there a way I can just capture the output like you see on the screen
when running the ldapmodify command?

Thanks in advance! - Todd

.