problem while getting the response back..plz help


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users problem while getting the response back..plz help
# 1  
Old 12-27-2006
problem while getting the response back..plz help

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.
Code:
#!/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.
Code:
 
#!/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.
# 2  
Old 12-27-2006
...never mind. I found another way to do the same task
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem reading terminal response string from Zsh

Note: This posting is related to my posting at bash - Reading answer to control string sent to xterm - Stack Overflow , but I could get there a solution only for bash. I can use that solution, but for curiosity, I wonder, whether I could do this in Zsh as well. The problem is to send a (Posix-)... (6 Replies)
Discussion started by: rovf
6 Replies

2. Shell Programming and Scripting

plz, i wait your help, AWK problem

I have tracefile of three nodes (0 , 1 and 2 ) as follows: + 0.02 0 1 tcp 40 ------- 1 0.0 2.0 0 0 - 0.02 0 1 tcp 40 ------- 1 0.0 2.0 0 0 + 0.02 2 1 tcp 40 ------- 2 2.1 0.1 0 1 - 0.02 2 1 tcp 40 ------- 2 2.1 0.1 0 1 r 0.025032 0 1 tcp 40 ------- 1 0.0 2.0 0 0 + 0.025032 1 2 tcp 40 -------... (11 Replies)
Discussion started by: ASAADAOUI
11 Replies

3. Shell Programming and Scripting

Interpretion problem. Plz Help me guys.

Hey friends, below mentioned script is giving me proper o/p which can be “1” or “2” echo select status_ac from db_acct where acct_num='$1'" | dbaccess elstest Now I want to interpret the o/p as follows. If o/p is 1 then “YES” If o/p is 2 then “No” And to do this I have modified above... (2 Replies)
Discussion started by: anushree.a
2 Replies

4. Linux

Output formatting problem..Plz hlp

Hi guys, It will be a great help if somebody can help me in following problem. I have tried hard but because of lack of UNIX/LINUX knowledge I am not able to do it. I have written a script that returns 3 things of all the employees in my organisation. i.e. Name, Login time & log out time of... (2 Replies)
Discussion started by: anushree.a
2 Replies

5. IP Networking

Apache mod_proxy +DNS slow response problem

My company has a private network, including a Apache web server (Linux) and some WinXP machines. The web server had been configured to use mod_proxy to connect to window update site via another company proxy server. It works for few years. Recently, some parties had setup a DNS server on the... (2 Replies)
Discussion started by: donaldfung
2 Replies

6. UNIX for Dummies Questions & Answers

have a problem with if elif loop .. plz help me with the script

count2=0 var2=NOT if then echo"Loop1" command="egrep ',$var1," if then echo "the command is OR" command=$command"|,$var3," echo "$command" elif then command=$command"| egrep ',$var3," else ... (4 Replies)
Discussion started by: Syms
4 Replies

7. Shell Programming and Scripting

UNIX script problem ..Plz help ASAP

Hi folks, I have written down a UNIX script which actually FTP the file to other server. What is happening now , this script is not working only for 1 server , as it is working for 32 different FTP server . In this particular server , we are getting message “FTp:550 access denied”... (1 Reply)
Discussion started by: khan1978
1 Replies

8. Linux

Mandrake 8.00 installation/Booting problem...Plz Help

Hey everyone, I'm new to the forum. I have a problem with Mandrake 8.00; i have installed it on my old PC with no problems (none mentioned) but on re-booting after the installation it just hangs after listing the devices: Hard Disk, CD-ROM & Floppy A. I have installed it on Packard Bell with... (2 Replies)
Discussion started by: sybella1
2 Replies

9. UNIX for Dummies Questions & Answers

Multiboot problem Help plz??

I have installed Win98 OS .......1st then RH7.2 with GRUB bootloader okay i.e in the Grub there is two choices 1-Linux 2-Dos also I install bootloader of linux in MBR -master boot record- when select Linux an error : ... (6 Replies)
Discussion started by: atiato
6 Replies

10. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies
Login or Register to Ask a Question