Flow control based on grep match pattern or string
Looking to create a flow control based on a string or pattern matched in a log file.
The log file may contain either of these
safafaf sdfaasfsa CONFSUCCESS
adsfasdfadsfadsf fafasfasdfasdf fafasfafsa
sadfafasfasdfadss fdsafadff fasfadfaf asff
So idea is to grep the message from log, based on pattern run a flow control as below.
1 Look in System.log - CONFSUCCESS - show message as - SUCCESSFUL - Ask user to - Press ENTER to continue
2 Look in System.log - CONFFAIL - show message as - FAILURE - Exit (come out of shell)
3 Look in System.log - CONFPARTIAL - Show message as - PARTIALSUCCESS - Exit (come out of shell)