Hello.
I have a status command in AIX box, which provides output as below:
$ status
You are running the application on pegasus2
----Program Name------|--Avail / Total---------|
MQ | 1/2 |
ORACLE | 10/10 |
TMADMIN | 2/2 |
------------------ | ------------------- |
I am seeking to write a script with output: How many Objects are available out of Total i.e.
1 MQ Running Out of 2
10 ORACLE Running Out of 10
2 TMADMIN Running Out of 2
I started preparing something like:
status | while read n
do
avail=`echo ${n} | awk -F " " '{print $1}'`
done
Your help will be appreciated for completing this. Thank you.