forbid the error message

In my system , there is a script seems have a minor problem but I can't find it out , now everytime run the script , it will generate some error message to the system log , is it possible to forbid it generate the error to the system log or put all these message to /dev/null ? thx

in a bourne-type shell

my_script 2>/dev/null

in a c-type shell (this is a fudge)

( my_script > /dev/tty ) >& /dev/null

Cheers
ZB

From your question I understand the following:

You dont want to display the error messages on the terminal. You either want it to go to the sys log or to /dev/null

This is way to put it to /dev/null

Say, a line in your script is

grep needle haystack

And you dont have the file haystack.

You would need this to redirect the error to /dev/null

grep needle haystack 2> /dev/null

Vino

thx much for replies.