Hello Friends,
sorry, i am not very familiar with Unix programming. Could you please help me on this?
We have to start different components from a startup script.
each components are started as below in the background in a startprocess function
$nohup $file $args >>$logFile 2>&1 &
after this the script calls some waiting method and waits in the logfile for some particular string as below
if grep -c "$pattern" $logFile>1; then ....
and go ahead with the next component.
We have now the problem that the background jobs continue writing into the log file even after startup and covering the disk space.
I am looking for a way to redirect the stdout of the background jobs to dev/null immediately after finding the successful start entry in the log.
Thanks in advance,
Alvin