Hello
Here's the code
ps -ef |grep pmon |grep -v grep |awk '{print $9}'
which returns this:
ora_pmon_DEV_ORCL1
ora_pmon_ORCL2
ora_pmon_DEV_ORCL3
ora_pmon_ORCL4
ora_pmon_DEV_ORCL5
When I tried another iteration to awk to just get the SIDS
with this code:
ps -ef |grep pmon |grep -v grep |awk '{print $9}' |awk -F_ '{print $3}'
which returns this:
DEV
ORCL2
DEV
ORCL4
DEV
I tried using the sub function but I can not get the syntax correct. How do I get just the SIDs
i.e.
DEV_ORCL1
ORCL2
DEV_ORCL3
ORCL4
DEV_ORCL5
Any help anyone can provide is greatly appreciated
Here's the code
ps -ef |grep pmon |grep -v grep |awk '{print $9}'
which returns this:
ora_pmon_DEV_ORCL1
ora_pmon_ORCL2
ora_pmon_DEV_ORCL3
ora_pmon_ORCL4
ora_pmon_DEV_ORCL5
When I tried another iteration to awk to just get the SIDS
with this code:
ps -ef |grep pmon |grep -v grep |awk '{print $9}' |awk -F_ '{print $3}'
which returns this:
DEV
ORCL2
DEV
ORCL4
DEV
I tried using the sub function but I can not get the syntax correct. How do I get just the SIDs
i.e.
DEV_ORCL1
ORCL2
DEV_ORCL3
ORCL4
DEV_ORCL5
Any help anyone can provide is greatly appreciated