why shell script fails


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting why shell script fails
# 1  
Old 08-21-2008
why shell script fails

hi ..
I have automate some process on unix through sehll script .
but i don't know there is some problem in scripts, some time shell script works and some time it fails. so my query is that "Why shell script fails some times?"

thanks
# 2  
Old 08-21-2008
post your script...
# 3  
Old 08-21-2008
myscript is

#!/bin/bash
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/ ./startManager.sh
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/ .startNode.sh
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/ ./startServer.sh server1
/opt/IBM/HTTPServer/bin/ ./apachectl start




After creating this script i have automate this script by making entery in /etc/init.d/script.sh and then i have created link in etc/rc3.d/ directory "S23script"

Now it runs on system startup automatically . but some time it does't work . why??
# 4  
Old 08-21-2008
well, in my experience, WL sucks moneky b@lls
you probably want to check the WL server logs while you run that command, and see where it fails

the script you posted shouldnt fail "some times" (considering that noone is moving the WL scripts round to make a prank)
# 5  
Old 08-21-2008
Timing? If for example the manager process backgrounds and has to complete initialisation before the services start you could try a short sleep between each command line.
If each process produces a log, check the content of each log and any timestamps to get a better idea of how to sequence the processes.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace string works on command-line but fails when run from shell script

I wish to replace "\\n" with a single white space. The below does the job on command-line: $ echo '/fin/app/scripts\\n/fin/app/01/sql' | sed -e 's#\\\\n# #g'; /fin/app/scripts /fin/app/01/sql However, when i have the same code to a shell script it is not able to get me the same output:... (8 Replies)
Discussion started by: mohtashims
8 Replies

2. UNIX for Beginners Questions & Answers

Linux shell | how to exit a script if any command fails.

Hi, i am new here let me say HI for all. now i have a question please: i am sending one command to my machine to create 3 names. if one of the names exists then the box return error message that already have the name but will continue to create the rests. How i can break the command and... (7 Replies)
Discussion started by: Amiri
7 Replies

3. Shell Programming and Scripting

How to exit from shell script if above condition fails?

HI cd ${back_home} if above back_home does not exist, then script shoul exit. Please let us know how to do that (7 Replies)
Discussion started by: buzzme
7 Replies

4. Shell Programming and Scripting

Script execution fails

hi, i am trying to run this script, getting below error, can some one help me in this Error: -bash: on_failure.sh: line 23: syntax error: unexpected end of file ======================================================== # CHANGE HISTORY # # YYYYMMDD Change by Desription # --------... (2 Replies)
Discussion started by: szs
2 Replies

5. Shell Programming and Scripting

Execute shell script even if the first script fails

All, I executing a perl script and shell script from a master shell script. i will execute the perl script first and have to execute the shell script after the completion of perl execution. Below is the code i use for it, script_root='/dev/scripts' /usr/bin/perl -S $script_root/test.pl;... (5 Replies)
Discussion started by: vel4ever
5 Replies

6. Red Hat

Proxy auth fails in shell

hi I am using RHEL 5.5. I updated the http-proxy like this http_proxy=http://username:password@IP:port/ When i do ping www.google.com PING www.l.google.com (74.125.236.177) 56(84) bytes of data. then it goes blank. I dont know why. But in the same linux, in gui mode. In... (2 Replies)
Discussion started by: gnanagurus
2 Replies

7. Shell Programming and Scripting

why shell script fails?

hi , i m trying to run a shell script automatically , some time it works fine but some time it fails , what could be the problem . If anybody have an idea about this problem then reply . Thanks in advacne (4 Replies)
Discussion started by: tahir23
4 Replies

8. UNIX for Advanced & Expert Users

why script fails sometime?

Hi, I am trying to run a shell script on solaris,some time it works fine and some times it fails unexpectedly. There is a script called "autostart.sh" which automatically starts the Application server but some times the script fails to strat the application server. can anyone tell me what... (10 Replies)
Discussion started by: tahir23
10 Replies

9. HP-UX

Shell Script fails with "can't connect to client"

Hi Unix Gurus, I have written a shell script to unfreeze all frozen media in NetBackup. Here is the script written on HP-UX using ksh: *********************************************** set -x cd $HOME rm -f frozentest rm -f mediaserver cd /usr/openv/netbackup/bin/admincmd pbrun... (2 Replies)
Discussion started by: sseenu79
2 Replies

10. Shell Programming and Scripting

Script fails

Hi, I am trying to install a package on solaris and one of the packaging scripts fail unexpectedly. There is a script called "checkinstall" which checks for the /opt space and aborts the installation if /opt is less than 100MB. In my case, even if /opt has enoguh space, the script fails. ... (8 Replies)
Discussion started by: JStone
8 Replies
Login or Register to Ask a Question