[ILUG] tee problem

From: Richard O'Mahony (richard.omahony at domain comnitel.com)
Date: Mon 22 Oct 2001 - 12:26:54 IST


Hi All,
        I have a problem with a script using the tee command. The part of the
script in question which causes the problem is

   SCRIPT A
                ...
                ...
                ...
            $COMMAND | tee -a ${LOG_DIR}/${LOG_FILE}
                ...
                ...
                ...
   END SCRIPT A

        The problem is that the script hangs at this line. the problem is due to
the fact the the $COMMAND script creates a deamon process during its
execution and the tee command will not exit until $COMMANAND and all of its
child processes have also stopped. What I am looking for is alternative to
tee (to log results to a file as well as printing them on the screen)or some
way to force the completion of the command. Using '&' to put the command
into the background is not acceptable as SCRIPT A interacts with the user.
Any help would be appreciated.
Thanks
Richard...



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:12:51 GMT