I've searched for a similar solution, but can't seem to get what I'm looking for. It seems like there is a simple answer.
I'm putting together a korn shell script that monitors processes to determine if three different Oracle databases are up. I've got a variable that contains the processes I'm interested by using this command:
UP=`ps -ef |grep [p]mon |awk -F_ '{print $3}'`
$UP then can contain the following text:
systest uat train
These processes could be in any sequence and I need to verify that those three are each included in this resultant text string. If not, I need to identify which one or ones are missing, meaning they are not up.
Any guidance is appreciated.
I'm putting together a korn shell script that monitors processes to determine if three different Oracle databases are up. I've got a variable that contains the processes I'm interested by using this command:
UP=`ps -ef |grep [p]mon |awk -F_ '{print $3}'`
$UP then can contain the following text:
systest uat train
These processes could be in any sequence and I need to verify that those three are each included in this resultant text string. If not, I need to identify which one or ones are missing, meaning they are not up.
Any guidance is appreciated.