Doing a command in the if statement

Im using MKS Toolkit c shell

I want to check if a command will nit return a certain message. If so....blah blah blah.

 if ( `command argument` != "ERROR!" ) then 

that did not work for me

does anyone have any idea of how to do this??

Thanks

C shells are pretty awfull. I think MKS Toolkit has a korn shell, you would probably be much better of using that (or the cygwin bash shell).

Your above code works in my csh (unix) shell, could be MKS Toolkit issue

How about:

command argument | grep -q "ERROR!"
if ( $status ) then

yeah looks like it.. i hear about csh, there is already a library of scripts so i cannot just switch like that.
ill try that out thanks