10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Team,
Im new to shell scripting please help in below issue:
Considering scenario i have 1.sql,2.sql,3.sql and 4.sql . If my second script fails my loop should come out and should not execute 3.sql and 4.sql.
Here is my code.
#! /bin/bash
echo "exit" | user/password | grep Connected >... (4 Replies)
Discussion started by: preethi87
4 Replies
2. Shell Programming and Scripting
hi guys
i have a question
my cron should start executing minute but it sould stop execute only i have tried tis
10 * * * * /home/sample.sh >>
/data/band/cron_$(date+|%Y|m|d).log (2 Replies)
Discussion started by: azherkn3
2 Replies
3. Shell Programming and Scripting
Im unable to stop the below infinite loop (bash script). Can someone tell me why this isnt responding to signals eg: ctrl+c (SIGINT) or ctrl+z
c=0
test_loop() {
c=$(($c+1))
echo "count value is : $c "
sleep 1
test_loop
}
Im using: SunOS 5.10
PS: If run this as... (13 Replies)
Discussion started by: Arun_Linux
13 Replies
4. Shell Programming and Scripting
Hey guys,
How do I make a loop that reads all the parameters en then stop when there are no parameters anymore ?
Something that gives an output like this:
./Script.sh parameter1 parameter2 parameter3
parameter = parameter1
parameter = parameter2
parameter = parameter3
Thanks a lot,... (5 Replies)
Discussion started by: Miki1579
5 Replies
5. Shell Programming and Scripting
After my if condtion give rusult true then script should stop execution.
Please advice...Thnaks in advance (1 Reply)
Discussion started by: vivek1489
1 Replies
6. Shell Programming and Scripting
I have a shell script that writes some data in a file. I want to stop the script after one hour from start of execution using "EXIT 1".
how to do it. I don't want to use CRONTAB. (5 Replies)
Discussion started by: mady135
5 Replies
7. Shell Programming and Scripting
Hi,
I have a file in which I have a number of insert statements (number is not fixed, it may have 10 statements or may be 1000....not fixed).
I want to execute these statements using a loop (1 statement per iteration).
For ex:
Input file has following statements:
Insert statement #... (6 Replies)
Discussion started by: ustechie
6 Replies
8. Shell Programming and Scripting
I wonder how to stop further loop iterations when conditions gets false e.g.
This file.txt contains the following structure :
1
2
3
4
5
6
7
8
9
10
How to stop iteration when if statement gets false ?
for n in `cat file.txt`
do
if (( n<=5 )) (1 Reply)
Discussion started by: presul
1 Replies
9. Shell Programming and Scripting
Hi Im running this script, which is supposed to find the max value build some tables and then stop running once all the tables are built. Thing is , it keeps assigning a null value to $h and then $g is null so it keep building tables i.e. testupdateNUL. How can I stop this? Here is what I have:
... (4 Replies)
Discussion started by: brandono66
4 Replies
10. UNIX for Dummies Questions & Answers
It is happening with my sessions already second time: a 'for'-loop for some reason stop to work as expected.
That means or it is looping without exitting, or it is not loop even once.
Here example of my try when it is not processing even one loop.
You can see, I start new subshell and... (14 Replies)
Discussion started by: alex_5161
14 Replies