Here is a nice little bit of bash snagging for you. You need to grab lines from a file, process each in turn, and then at the very end report whether or not there was a problem for any of them. Simple ? Not quite.
The following scripts are mangled to show how this works, so don't expect them to operate as-is.
#!/bin/bash
PROBLEM=0
cat $CONF | grep backup | grep @ |
while IFS=$TAB read var1 var2 var3 var4
do
PROBLEM=1
echo PROBLEM:$PROBLEM
done
echo PROBLEM: $PROBLEM