Hi,
To explain this question I will have to go into a bit of detail. I hope you don't mind.
currently I have a log handler (an already compiled c++ version) and what it does is makes a log file and writes all the unix output (echo, etc) of a script to that log file. To me the log_handler is a black box.
The log_handler is called through another script called "run_application"
(e.g. run_application somescript1 2>&1 > /dev/null )
RUN_APPLICATION script is just this:
APPLICATION=$@
LOGNAME=`basename $APPLICATION`
if [ -n "$APPLICATION" ]
then
$APPLICATION 2>&1 | /bin/log_handler $LOGNAME &
fi
Now my question is. Is it log_handler thats taking the script and logging it or is it being done through redirection and piping?? And if so how does it work? What does the 2>&1 do?
The second part would be to mimic this in java but i guess thats another thread.
Thanks all for the help.