How to get a list of current Oracle CDBs on server If I have a server with one or more CDBs, what command can I run on the server in order to obtain a list where each item uniquely identifies one of the CDBs?

(a "CDB" is an Oracle Container Database)

Note 1: 
I realize that it is rare to have more than one CDB on a server.  But in that case I would still want to obtain the unique CDB name of that one CDB.

Note 2: I know that the command cat /etc/oratab will list a bunch of DB installations on the server.  But this includes installations that no longer exist.  I want a list of only the currently existing CDB installations.
This is how I list running database instances. Container-databases or non-container databases: 

  cat &gt;&gt; ~/.bash_profile &lt;&lt;EOF
  oinst() {
      /bin/ps -ef | grep ora_lgw[r] | awk '{print $8}' | sed -e 's/ora_lg[w]r_//'
  }
  EOF

  $oinst
  CDB1
  CDB2
  CDB3


If database instances are not running you are left with information from  /etc/oratab, init&lt;SID&gt;.ora, orapw&lt;SID&gt; or database-files on ASM, filesystem or RMAN.