9 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
Hello All,
I have embedded some expect code inside a Bash script I'm writing, but for some reason any variable I 'set' to something is
showing as empty immediately on the next line...
I haven't run into this problem before so I'm not sure what it could be...? I'm guessing it has something to... (4 Replies)
Discussion started by: mrm5102
4 Replies
3. Shell Programming and Scripting
I have written a script which checks for a file if that is being updated or not. If the files is not being updated then it will restart the process.
#!/bin/sh
DATE=`date +%Y%m%d%H%M%S`
LOG_FILE=/var/xmp/log/XMP_*
INCEPT=`ls -l $LOG_FILE |awk '{print $5}'`
PROC=`xms show pr |grep -i... (3 Replies)
Discussion started by: Siddheshk
3 Replies
4. AIX
Hi
I know that to see the size of the lun I need to give the command as "bootinfo -s hdisk*"
Can any one assist me with a script which if run will get the size of all the luns allocated to the server. The output of the script should be something like the one below :
hdisk0 size = 24GB... (2 Replies)
Discussion started by: samsungsamsung
2 Replies
5. Shell Programming and Scripting
Hello,
I have a shell script which calls for an existing script with appropriate parameters. It looks something like this.
--------------------------------------------------------------------------
#!/bin/bash
sh /root/ams_rc stop_shepherd > /dev/null
sleep 30
sh /root/ams_rc... (9 Replies)
Discussion started by: Siddheshk
9 Replies
6. Shell Programming and Scripting
I'm trying to capture the output of some commands with the 'script' utility. Normally, I would type 'script /path/to/output/file', then enter commands, then hit ctrl+D to end the 'script' capture. I'm having trouble with it on a server. Upon starting 'script', it exits immediately before I type... (6 Replies)
Discussion started by: jalburger
6 Replies
7. Shell Programming and Scripting
Hello, I created a shell script in /etc/init.d and it already runs at boot. However I cannot figure out how to make it run just like typing "scrip_name start"
I can run it like this ./script_name but since I am doing remote log in whenever I log off the script stops and I also don't want to run... (8 Replies)
Discussion started by: kizofilax
8 Replies
8. Shell Programming and Scripting
Hi,
I would like to check if there's any sample of restart script for my AIX server.
I'm planning to restart it every month.
Thanks. (5 Replies)
Discussion started by: ademah
5 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I am writing a script and need to goto the start of the script if an incorrect command is wrongly entered what can i do.
Andy (1 Reply)
Discussion started by: chapmana
1 Replies