How to execute script one by one in automated env


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to execute script one by one in automated env
# 1  
Old 07-02-2008
How to execute script one by one in automated env

I have scripts and when I run mannualy it passed but I would like to run one by one at a time like automated. But When I run in one by one in automated the 1st one is executed and did not jump to 2nd one.Please suggest how to run one by one at a time in automated env.

sample of Script

E=`${AgcfShell} -l ${AgcfUser} ${AgcfIp} "trap '' INT;. ~/.profile >/dev/null 2>/dev/null; /usr/bin/hostname"`
D=`${AgcfShell} -l ${AgcfUser} ${AgcfIp} "trap '' INT;. ~/.profile >/dev/null 2>/dev/null; /usr/bin/uname -a"`
if [ "$D" == "SunOS $E 5.10 Generic_127112-10 i86pc i386 i86pc" ]
then
echo "PASSD";
else
echo "FAILED";
fi


is there anything have to change in the script ??
# 2  
Old 07-02-2008
Quote:
Originally Posted by madhusmita
I have scripts and when I run mannualy it passed but I would like to run one by one at a time like automated. But When I run in one by one in automated the 1st one is executed and did not jump to 2nd one.Please suggest how to run one by one at a time in automated env.

sample of Script

E=`${AgcfShell} -l ${AgcfUser} ${AgcfIp} "trap '' INT;. ~/.profile >/dev/null 2>/dev/null; /usr/bin/hostname"`
D=`${AgcfShell} -l ${AgcfUser} ${AgcfIp} "trap '' INT;. ~/.profile >/dev/null 2>/dev/null; /usr/bin/uname -a"`
if [ "$D" == "SunOS $E 5.10 Generic_127112-10 i86pc i386 i86pc" ]
then
echo "PASSD";
else
echo "FAILED";
fi


is there anything have to change in the script ??

when I am running like

Script1 &
Script2 &

it is automated running but if Script1 is failed but results is showing passed ..please suggest..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need an automated script

Hi, I need a script to execute below task. As of now I am doing it manually and want it automated. 1)go to below path cd /path/of/file check for the availibility of two file as below of the latest date. test.week1.data test.week2.data Case1. If above files are not present... (3 Replies)
Discussion started by: sv0081493
3 Replies

2. Web Development

Deny from env=env-variable Does not work

(Above from Apache docs). On my system, using: SetEnvIf User-Agent Mozilla IsBad=1 Order allow,deny Allow from all Deny from env=IsBad ...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs. (1 Reply)
Discussion started by: gnurob
1 Replies

3. UNIX for Dummies Questions & Answers

how to make script automated

if i have a script called test.sh file1=$(ls -l|awk '{print $9 $1}') awk ' /date_of_selling:/ { print $6 ":" &9 }' /$file1 >> data.txt if i wanna this script to run automatically every day at 8 am :D (3 Replies)
Discussion started by: teefa
3 Replies

4. Shell Programming and Scripting

Automated log script

Hello, I am scripting noob but I need little monitoring script. It will be very good if you can help me. What I need: Script will login via ssh to another machine (ssh -l user ipadress), make top command and log first row + machine ip. It should monitor like 10 machines. Script should run... (1 Reply)
Discussion started by: Biosko
1 Replies

5. Shell Programming and Scripting

How to automated the shell script

hye there... really need ur help... i have a file ./filename... then i want to make ./filename automatic run... for example: if someone send me a file using scp...then the ./filename will run automatically... did u guys get what i mean.... if not please ask me... cz i really need ur help... (29 Replies)
Discussion started by: annetote
29 Replies

6. UNIX for Advanced & Expert Users

scp automated script

Hi Unix gurus, I am trying to create a script to automate the copying of files daily from one server to another using the scp command. --> #!/bin/ksh KEY="$HOME/.ssh/SSHKEY" if ;then echo "Private key not found at $KEY" >> $LOGFILE echo "* Please create it with \"ssh-keygen -t dsa\" *"... (5 Replies)
Discussion started by: gholdbhurg
5 Replies

7. Shell Programming and Scripting

i want automated script

echo "Enter your choice :\c" read num case $num in . 1)"${TEST_HOME}"/ctrl_extract.ksh 1 ;; 2)"${TEST_HOME}"/ctrl_extract.ksh 2 ;;3)"${TEST_HOME}"/ctrl_extract.ksh 3 ;; 4)"${TEST_HOME}"/ctrl_extract.ksh 4 ;; 5)"${TEST_HOME}"/ctrl_extract.ksh 5 ;;... (3 Replies)
Discussion started by: arghya_owen
3 Replies

8. Shell Programming and Scripting

Need help for automated shell script

hi, I have a system with 3 O/S on it ( win 32, RHEL 4 32 & 64) I'm very new to shell scripting and I'm seeking for help in this matter.. I want to have an automated script on REDHAT that would run/open multiple applications one after other timed out at 20 seconds interval. Eg:... (4 Replies)
Discussion started by: uneex
4 Replies

9. UNIX for Advanced & Expert Users

help for automated script

Hi ALL: I need to write a script that will start bunch of servers. and these servers each has a sudo account and they need a passowrd. I dont know where to start and look. Can you please give me some hints or some sample code. Thanks in advance. splax (4 Replies)
Discussion started by: splax
4 Replies

10. Shell Programming and Scripting

Adding command line env in cron env

Hello friends, i run two scripts manually & they work. i run them in cron & they don work. how to match the two env's 1.command line env 2.cron env i would like cron to use command line env. Thanks & Regards Abhijeet (1 Reply)
Discussion started by: abhijeetkul
1 Replies
Login or Register to Ask a Question