ps-ef|grep pmon (Instance Name Only) When i issue a "ps -ef|grep pmon", I get the below output.



oracle   230330      1  0 Jan08 ?        00:01:14 asm_pmon_+ASM1      
oracle   244018      1  0 Jan08 ?        00:00:59 ora_pmon_vbsenopd     
oracle   244020      1  0 Jan08 ?        00:01:01 ora_pmon_vbdrazpd      
oracle   244021      1  0 Jan08 ?        00:01:00 ora_pmon_vbrmant      
oracle   244042      1  0 Jan08 ?        00:01:25 ora_pmon_dx07123      
oracle   244080      1  0 Jan08 ?        00:01:28 ora_pmon_rpasnap1      




Now, Is there anyway that i can get only the active database names (for eg. rpasnap1 instead of ora_pmon_rpasnap1) using "ps-ef|grep pmon" or any other method?



Your help is my salvation.
$ ps -ef | grep pmon | grep -v grep
oracle   23955     1  0 Jan16 ?        00:00:33 asm_pmon_+ASM
oracle   27366     1  0 Jan16 ?        00:00:31 ora_pmon_S112

$ ps -ef | grep pmon | grep -v grep | awk '{ print $8 }' | cut -d '_' -f3
+ASM
S112

$ ps -e -o command | grep pmon | grep -v grep | cut -d '_' -f3
+ASM
S112