1826751 Members
3072 Online
109702 Solutions
New Discussion

Re: plink/putty

 
p7
Frequent Advisor

plink/putty

When in rumba I execute the command and it works:


ORACLE_HOME=`if [ -r /var/opt/oracle/oratab ]; then ofile=/var/opt/oracle/oratab; else ofile=/etc/oratab; fi; grep -i "^giro:" $ofile | cut -d: -f2`; export ORACLE_HOME; echo $ORACLE_HOME

Returning the value

/ora1db01/app/oracle/product/10202


from my PC I execute the

Plink.exe command as follows:

plink.exe -pw utsftp utsftp@hpcb3 -P 22 "ORACLE_HOME=`if [ -r /var/opt/oracle/oratab ]; then ofile=/var/opt/oracle/oratab; else ofile=/etc/oratab; fi; grep -i “^giro” $ofile | cut -d: -f2`; export ORACLE_HOME; echo $ORACLE_HOME"


but instead the returning value is


if [ -r /var/opt/oracle/oratab ]; then ofile=/var/opt/oracle/oratab; else ofile=/etc/oratab; fi; grep -i “^giro” $ofile | cut -d: -f2


How do I get the command to work correctly?

1 REPLY 1
Jean-Yves Picard
Trusted Contributor

Re: plink/putty

Hello,

why not try :

plink.exe -pw utsftp utsftp@hpcb3 -P 22 "if [ -r /var/opt/oracle/oratab ]; then ofile=/var/opt/oracle/oratab; else ofile=/etc/oratab; fi; grep -i ^giro $ofile | cut -d: -f2"

Jean-Yves Picard