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...
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!