Oct-20-2018, 07:18 AM
(This post was last modified: Oct-20-2018, 07:18 AM by alinaveed786.)
Can we use below OS commands (inside the file.txt) and then pass this file an argument to the subprocess.popen for execution?
OR is there a better way to execute all below OS commands inside python script?
OR is there a better way to execute all below OS commands inside python script?
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH cd $ORACLE_HOME mv OPatch OPatch.pre6880880 mkdir OPatch osTyp=`uname -s` if [ "$osTyp" = "Linux" ]; then cp /gfd/infr/DBA/oracle12102-Linux-X86-64/6880880_zipDir/p6880880_122010_Linux-x86-64.zip . unzip p6880880_122010_Linux-x86-64.zip elif [ "$osTyp" = "SunOS" ]; then cp /gfd/infr/DBA/oracle12102-Solaris64/6880880_zipDir/p6880880_122010_SOLARIS64.zip . unzip p6880880_122010_SOLARIS64.zip else echo "!!" echo "!! unable to determine OS type" echo "!!" fi