I configured a job in oem to execute script on all hosts.
Job shows succcess as script execution successful... but after execution hosts...script output has errrors...how can we show job fail failover if script output has errors.
For this you can create a multi-task job, see https://docs.oracle.com/cd/E73210_01/EMADM/GUID-3F8CCFFA-4290-4AA9-A093-1E1659C8784D.htm#EMADM9550
The first task is your task.
The second task checks the output file created by the first task. Something like
grep -i error <your output file> > /dev/null
# If found exit with an error code
if [ $? = 0 ]
then exit 1