Dec-05-2018, 10:50 PM
(This post was last modified: Dec-05-2018, 10:50 PM by anandoracledba.)
I have this simple code:
Please help me understand what I am doing wrong here. Thanks in advance.
#!/usr/bin/env python import sys, re, os NAS1=os.environ['NAS1'] print 'Value of NAS1: ' + NAS1 pwdfile='NAS1/admin/data/pswds' print 'Value of pwdfile: ' + pwdfileWhen I run this code, the "pwdfile" variable doesn't pick up the "NAS1" value from 2 lines above it.
Output:$ ./search.py
Value of NAS1: /u01/app/oracle/NAS1
Value of pwdfile: NAS1/admin/data/pswds
Expected output for 'pwdfile' = /u01/app/oracle/NAS1/admin/data/pswdsPlease help me understand what I am doing wrong here. Thanks in advance.