how to grep within a script, and test result?
I want to grep for a record in a text file from within a ksh script. I want to pass a variable.
grep `$checkpolicy $DONELIST`
If the result is successfull skip the next piece of code, (which sends an email), and continue. The email will have already been sent on the previous pass.
How do i test for the result, what parameter will the grep return?
Thanks.
|