The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
invoking a shell script inside cgi shell script smriti_shridhar Shell Programming and Scripting 2 07-09-2008 02:50 AM
How to pass a parameter from one Shell-script to another Shell-script subodhbansal Shell Programming and Scripting 2 09-22-2007 06:19 AM
Shell Script fails with "can't connect to client" sseenu79 HP-UX 2 12-20-2006 10:47 AM
Have a shell script call another shell script and exit heprox Shell Programming and Scripting 2 11-20-2006 08:17 AM
Script fails JStone Shell Programming and Scripting 8 08-10-2006 01:00 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-21-2008
tahir23 tahir23 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 25
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 (permalink)  
Old 08-21-2008
vidyadhar85's Avatar
vidyadhar85 vidyadhar85 is offline Forum Staff  
Moderator(The Tutor)
  
 

Join Date: Jun 2008
Location: INDIA
Posts: 1,400
post your script...
  #3 (permalink)  
Old 08-21-2008
tahir23 tahir23 is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 25
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 (permalink)  
Old 08-21-2008
broli's Avatar
broli broli is offline
Registered User
  
 

Join Date: Dec 2007
Location: Argentina
Posts: 215
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 (permalink)  
Old 08-21-2008
methyl methyl is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1,183
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0