Hi Guys,
I have a very limited knowledge on shell scripting.
When I execute dspmq, I get either
" Running" or "Running in Standby" as output
HTML Code:
$dspmq
QM1 Running
QM2 Running as StandBy
I want my script to run only if the output of dspmq is "Running".
I executed the below command
HTML Code:
dspmq -m qmgrname |grep "Running
"
But my script is getting kicked off for both "Running" and "Running as Standby"
When I grep for "Running", I am getting both "Running" and "Running as Standby".
As "Running" is available in both the strings, I am getting my script kicked for both cases.
How do I get my script kicked for "Running" alone.
Let me know your thoughts.