I am trying to store stdout&stderr into $log and $script_log. $log has all other process log so used >> $script_log needs only log from set_flag.sh and update.sh.
set_flag.sh 2>&1 >> $log | tee -a $log > $script_log
update.sh 2>&1 >> $log | tee -a $log >> $script_log
$log is fine. I can see all process logs from both set_flag.sh and update.sh but somehow $script_log has log from set_flag but partial log from update.sh. Not sure why....
Can anybody explain and help me out?
Thanks,