10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am using blow script :--
#!/bin/bash
FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not
if
then
# echo "process found"
exit 0;
else
echo "process not found"
exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies
2. Shell Programming and Scripting
Hi,
I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help..
i am using below command to run script
nohup system_traps.sh &
but in some... (9 Replies)
Discussion started by: ketanraut
9 Replies
3. Shell Programming and Scripting
Suppose i have 3 different servers say x,y and z.
Im running some process say ABC and 40 instances for the same is being created.
In load sharing suppose on
server x, 20 instances are running
server y, 10 instances are running
server z, 10 instances are running.
While checking the... (1 Reply)
Discussion started by: ankitknit
1 Replies
4. Shell Programming and Scripting
I am relatively new to scripting. I am trying to develop a script that will
1. Source an executable file as an argument to the script that sets up the environment
2. Run a command "stat" that gives the status of 5 Engines running on the system
3. Check the status of the 5 Engines as either... (0 Replies)
Discussion started by: paslas
0 Replies
5. Shell Programming and Scripting
Can I use -ctime/-mtime to verify if a particular directory has been updated or not?
I don't care about number of days. I just want to perform some operations only if the folder is modified (or it's metadata is modified), i.e. some files are added to the directory.
This thread has a more... (1 Reply)
Discussion started by: Pramit
1 Replies
6. Shell Programming and Scripting
Hi All,
I like to check the status of sendmail and take the appropriate action based on success / failure etc.
I have gone through one of the thread where a suggestion is made to use RC for return code
Following is the code:
==================================
#!/usr/bin/bash
export... (0 Replies)
Discussion started by: tmanda
0 Replies
7. Shell Programming and Scripting
Hi,
Is there any way to check the status of the mail sent or not.e.g
mail -s "Error Message" abc@xyz.com <aaa/bbb/data.txt
Can it return a status code which will confirm the delivery of mail sent?Please suggest.
Thanks,
Anil (1 Reply)
Discussion started by: anil029
1 Replies
8. Shell Programming and Scripting
I'm developing a script that spawns many background processes that will be executing concurrently and need to check the exit status of each spawned process after it terminates. After starting the background process I can get the pid from $! which I can store in an associative array but how do I... (2 Replies)
Discussion started by: twk
2 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I m new to unix and I need a help in FTp-ing a file.
My script is given below
ftp -n <<END_SCRIPT
open $FTP_HOST
user $FTP_USER $FTP_PASSWD
lcd $TEMPFOLDER
cd $FTP_LOCATION
put $1
bye
END_SCRIPT
exit_status=$?
if ; then
log "successfully FTPed the file"
else... (5 Replies)
Discussion started by: MeeraNair
5 Replies
10. Shell Programming and Scripting
I hope one of you smart people out there can help me with what seems like a real simple questing but I can't quite figure out.
In a script I am doing a cmp on two files. I am trying to check the exit status with an if statement but can't seem to figure out the syntax. If the exit status is 1 I... (4 Replies)
Discussion started by: PrimeRibAndADew
4 Replies