I am working with the Oracle 10.2.0.3 job scheduler on Solaris 10, and unfortunately, the scheduler executes scripts in such a way that several default shell environment variables are not defined. For example, $HOME, $USER, and $LOGNAME are missing.
How can I parse the appropriate record in /etc/passwd into the above variables? For example, when the output from "grep oracle /etc/passwd" is:
oracle:x:100:1978::/usr/oracle:/bin/ksh
I need to parse the information so that I can manually export the following variables:
That's the problem. When running under the Oracle Scheduler, the "normal" shell environment variables are not fully populated. Actually, only two shell variables are populated, and they are not among the list I mentioned above. I'm having to "backfill" what is missing.