Is this a Bash question or is it really about Bamboo? Here is the answer to a Bash question:
If you run
[[ ! $(grep ERROR /a/directory/log/*) ]]
The script will fail if it finds the word "ERROR" anywhere in the files.
Bamboo should detect the completion of the task as failed.
(Note that if Bash is not the default shell on your target system, you may need #!/bin/bash on top of the script file.)
source share