Bash process output analysis

Looking to create a script to listen to each output from a task while it is running and launch a function if a specific error message is found at any point and if not to continue uninterrupted.

#!/bin/bash
read checker <<< $(reaver -i mon0 -b 'target bssid' -vv)
if [ "$checker" == "Error message" ] ; then
function 
elif "continue as normal"

fi

reaver is a wireless network cracking utility.

unix.com will not help you crack networks or computers.