09-22-2017
It is hard to make many comments about whether or not your code is likely to succeed or where it might be failing with all of the variables you're using that (as far as we can tell) have never been set.
Not knowing whether some of the scripts you invoke wait for application startup to complete before returning means that we have no idea whether or not the scripts you invoke to get the status of your application have built-in race conditions.
And, implying that your script is failing, but not clearly describing what is not working correctly leaves us making lots of guesses and assumptions that are probably wrong.
I can also say that your erratic indenting serves to hide the structure of your code. Please learn to line up related while, do, and done keywords; if, then, else, and fi keywords; for, do, and done; etc. and consistently indent code that is in a while, for, then, else, etc. clause.
Please take some time to explain what your variables are supposed to contain and show us how they are initialized. Explain what the scripts you invoke are supposed to do, whether or not you know that they work correctly (if you invoke them correctly), and show us the outputs that they produce (in CODE tags). And, clearly explain what is working correctly (if anything) and what is failing (and explain the symptoms of those failures). Show us the output produced by running your script with tracing enabled (set -xv) (again, in CODE tags).
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi
A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as
" usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Discussion started by: Vetrivela
2 Replies
2. UNIX for Dummies Questions & Answers
Dear All,
I am a newer of Unix Administrator. I would like to know any way to make Unix syslog critical error send automatically to me by email.
Then I don't need to check it manually and frequency everyday.
Any suggestion?
Thanks for all your kindly help.
Jacky (1 Reply)
Discussion started by: ITJacky
1 Replies
3. Solaris
Friends,
I am in search for a shell script that is capable of running as a cronjob and have to send out an email when ever there is a CORE DUMP.
Please post the hints to achieve my goal.
Thanks in advance. (1 Reply)
Discussion started by: rtatineni
1 Replies
4. AIX
Hi,
I want to write a script to send alert by email whenever any failed login to the AIX. Can anyone tell how to do that?
Thanks!
Victor (1 Reply)
Discussion started by: victorcheung
1 Replies
5. Shell Programming and Scripting
Hello ,
I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them .
I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
Discussion started by: nairshar
2 Replies
6. Shell Programming and Scripting
Hi,
I have written below disk space monitoring script to monitor disk space every minute. I have scheduled this script through cron. But now my problem is this script alerts the users continuously until the space is freed up. These emails are filling up the inbox exponentially until the space... (3 Replies)
Discussion started by: svajhala
3 Replies
7. Shell Programming and Scripting
This is my first time writing a script and Im having some trouble,
Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage
I tried grep
Obviosly that hasnt worked,
Any... (8 Replies)
Discussion started by: jay02
8 Replies
8. Shell Programming and Scripting
Hi,
I want to read file multiple times. Right now i am using while loop but that is not working.
ex.
While read line
do
while read line2
do
echo stmt1
#processing some data based on data.,
done < file2.txt
done < file1.txt # This will have 10... (4 Replies)
Discussion started by: tmalik79
4 Replies
9. Shell Programming and Scripting
Hi
I need help to do this. This is the output of qshape:
user$ qshape deferred|head
T 5 10 20 40 80 160 320 640 1280 1280+
TOTAL 0 0 0 0 0 0 0 0 0 0 0
T stands for minutes elapsed and TOTAL... (1 Reply)
Discussion started by: zorrox
1 Replies
10. Shell Programming and Scripting
Hello ALL,
need a BASH script who find file and send email with attachment.
I have 50 folders without sub directories in each generated files of different sizes but with a similar name Rp01.txt Rp02.txt Rp03.txt ...etc. Each directors bound by mail group, I need a script that goes as... (1 Reply)
Discussion started by: penchev
1 Replies