Hi ALL:
I am not able to get the response back from weblogic in the shell script.
The weblogic server in different account. I am able to login to that account and bring the server up but while doing a ping, the script is failing. While the same script is running fine if I run it on the account manually.
#!/usr/bin/ksh
sudo su - serverxxx<<EOF
cd /xxxx/bea/user_projects/domains/myDomain
. startWeblogic.sh
RESULT=`/xxx/bea/jdk142_08/bin/java -classpath /xxx/bea/weblogic81/server/lib/weblogic.jar weblogic.Admi
n -url xxxx:7004 -username xxxx -password xxxx PING`
echo 'RESULT=$RESULT'
exit
EOF
But If login to the account manually(instead of shell script) and run the following script, RESULT has the information.
#!/usr/bin/ksh
cd /xxxx/bea/user_projects/domains/myDomain
. startWeblogic.sh
RESULT=`/xxx/bea/jdk142_08/bin/java -classpath /xxx/bea/weblogic81/server/lib/weblogic.jar weblogic.Admi
n -url xxxx:7004 -username xxxx -password xxxx PING`
echo 'RESULT=$RESULT'
I am getting the following error:
ksh[2]: 1: not found
ksh[4]: RTT: not found
RESULT=
Please help me. Am i missing something here.??
Note: I can check whether weblogic is up or not by its PID. But I need to do some more administration through shell script. So if the ping works then I can do more administration.