![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| why shell script fails | tahir23 | Shell Programming and Scripting | 4 | 08-21-2008 10:37 AM |
| #!/bin/sh script fails at StringA | tr "[x]" "[y]" | by_tg | UNIX for Dummies Questions & Answers | 3 | 02-22-2008 12:17 PM |
| SCP fails sometimes | vipinc | AIX | 10 | 07-18-2007 02:38 AM |
| Shell Script fails with "can't connect to client" | sseenu79 | HP-UX | 2 | 12-20-2006 10:47 AM |
| Script fails | JStone | Shell Programming and Scripting | 8 | 08-10-2006 12:00 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 is the reason , why it dn't work properly . The Script 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 _______________________________________________ Thanks in advance. |
|
||||
|
I'm surprised it ever works... why are there spaces between the directory name and the script name? Try making it like this:
Code:
#!/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 |
|
||||
|
Thanks Annihilannic
Code:
#!/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 .......... Spaces are not in script , i know it will not work if there would be any space, i m sure that there is no error in this scrips and at this time script is running but some time it works and some time no.I have automate and it works on system stratup , I don't know why this problem occurs. Last edited by bakunin; 08-21-2008 at 03:50 AM.. Reason: Please use "code"-tags when posting a script. |
|
||||
|
When does it work and when does it not work? Does it work when you run it manually, but not when you system boots up? Or is it completely random... i.e. sometimes when you run it manually it works, sometimes it doesn't?
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|