Oct-20-2018, 10:13 AM
Not working either with os.chdir.
#!/usr/bin/python import os import subprocess subprocess.run('echo $ORACLE_HOME', shell=True) os.chdir("'$ORACLE_HOME'") subprocess.run('pwd', shell=True)Error
/u01/app/oracle/product/12.1.0.2/db_1 Traceback (most recent call last): File "/u02/scripts/Patching/Ping.py", line 9, in <module> os.chdir("'$ORACLE_HOME'") FileNotFoundError: [Errno 2] No such file or directory: "'$ORACLE_HOME'"