Help with Error Handling on Script

Hi,

I need your guys help again. I run a script which check for some process status in a loop. when i check the process some of the process could throw an error, how can i check that inside my script.

Thanks,

RR

What type of error will they throw? Runtime or error text messages?

You asked a theory question. To get a good answer, you need to provide specifics:
1) your script text
2) files/programs you are checking
3) what errors you are anticipating, how to know about the errors
4) what you want to have happen when error is found

Hi,

Thanks for your replies. Here is sample script text i am trying to do.

if [$chk_one_process] 
then 
  <command> $chk_one_process > $LOGDIR/logfile 
else 
  for i in $multi_process 
  do 
    <command> $i > $LOGDIR/logfile.$i
  done 
fi 

In this when i run a command for multi process in the loop some of the process might throw an exception / error. I want to capture that and put that in the logs.

Regards,

Ravikumar R