Using the feed backs from everyone. I wanted to do it this.
I want to obtain summarized logs since the last run (I don't want to have a seperate file to maintain the id, would like to implement everything in this script or calling a datastage job to send the recent id).
I wrote a small skeleton structure to do this task. Please let me know if I am falling into any pit.
Code: Select all
newestid = xxx (from dsjob -logdetail PROJECT JOB)
var_toggle=0
while line LINE
do
$(echo "$LINE" | grep -qe [^$newestid]) && var_toggle=1
if var_toggle -eq 1
echo $LINE
fi
done << `dsjob -logsum PROJECT JOB`
Am I neglecting anything over here?