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
why script fails sometime? tahir23 UNIX for Advanced & Expert Users 10 08-21-2008 07:04 PM
why shell script fails tahir23 Shell Programming and Scripting 4 08-21-2008 11:37 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-25-2008
tahir23 tahir23 is offline
Registered User
  
 

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

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

Join Date: Aug 2008
Posts: 25
Thanks 4 ur reply ... My Script is

autoScript.sh


#!/bin/bash
/opt/IBM/HTTPServer/bin/apachectl start >/tmp/start.4.log 2>&1
  #4 (permalink)  
Old 08-25-2008
broli's Avatar
broli broli is offline
Registered User
  
 

Join Date: Dec 2007
Location: Argentina
Posts: 215
this sounds familiar ...
hey, youa re the due that asqued the same question here why shell script fails
  #5 (permalink)  
Old 08-25-2008
otheus's Avatar
otheus otheus is offline Forum Staff  
Moderator ala Mode
  
 

Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,889
Dude, the shell script is not failing... the "apachectl" command is. Look at start4.log when it fails. You can help yourself by automatically emailing yourself the logfile when it fails. Just ADD:

Code:
if [ $? -gt 0 ]; then 
  mail -s "apache failed with $?" $USER < /tmp/start.4.log
fi

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 10:43 AM.


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