[HELP]求解!!

[HELP]求解!!

各位大虾:
逻辑很简单:

if (指定文件中包含字符串"error" or "failed") then
   给出提示;
   退出;
end;

请各位帮帮我这个新手啊! 谢谢了!      
复制内容到剪贴板
代码:
if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
    The if COMMANDS are executed.  If the exit status is zero, then the then
    COMMANDS are executed.  Otherwise, each of the elif COMMANDS are executed
    in turn, and if the exit status is zero, the corresponding then COMMANDS
    are executed and the if command completes.  Otherwise, the else COMMANDS
    are executed, if present.  The exit status is the exit status of the last
    command executed, or zero if no condition tested true.
      
dearvoid,
谢谢你的答复.
但是能不能给出我具体的代码呢?      
cat a.txt|while read a b
do
if [ $a = end -o $b = end ]
then
echo "this is end"
exit
else
echo "$a $b"
fi
done


a.txt:
1.00    2.21
end    2000
3.00    1.12

运行结果:
1.00 2.21
this is end