Parsing Listener.ora

Anymore have any code to easily parse the listener.ora to update the ORACLE_HOME for a specific sid?

thanks.

Wouldn't you be better off to get what you need from /usr/local/bin/oraenv (or wherever you put it.)? /opt/var/oracle/oratab (or wherever you put it like /etc/ for Linux) also tells you what instances are supposed to be running locally.

oraenv is all about setting correct environment variables.

Usually you need both ORACLE_SID and ORACLE_HOME defined and possibly TWO_TASK define as well for remote instances.

The interdependence of those two files:
Linux oraenv Tips