until loop fails.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting until loop fails.
# 8  
Old 09-16-2009
I had a similar idea as jp2542a, but instead using a single script and also without the sleep granularity...

Code:
/tmp/test/abc.sh &
procpid=$!

# Start wait dots in the background
(while : ; do printf "."; sleep 1 ; done)&
printpid=$!

# wait for the program to finish
wait $procpid

# kill the wait dots
kill $printpid
echo


Last edited by Scrutinizer; 09-16-2009 at 12:24 PM..
# 9  
Old 09-18-2009
Thanka all,, that really helped me to learn lot, i have acheived the output using "jobs" and that is what i was looking for,,
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk loop using array:wish to store array values from loop for use outside loop

Here's my code: awk -F '' 'NR==FNR { if (/time/ && $5>10) A=$2" "$3":"$4":"($5-01) else if (/time/ && $5<01) A=$2" "$3":"$4-01":"(59-$5) else if (/time/ && $5<=10) A=$2" "$3":"$4":0"($5-01) else if (/close/) { B=0 n1=n2; ... (2 Replies)
Discussion started by: klane
2 Replies

2. Shell Programming and Scripting

Reset while loop to loop same file multiple times

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

3. Shell Programming and Scripting

While loop not reading all files if ssh fails

The below while loop is in ksh on a SunOs server: SPARC-Enterprise 5.10 The ksh version is: Version M-11/16/88i The intention of the below while loop is to read through a list of file names in files.txt and delete each file from a server, one at a time. The delete works, the problem is that if... (6 Replies)
Discussion started by: LES2013
6 Replies

4. Shell Programming and Scripting

Array Variable being Assigned Values in Loop, But Gone when Loop Completes???

Hello All, Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....? I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies

5. Programming

realloc() fails

Not sure in which forum to post this. I'm trying here, in Programming. I'm working on a PC with Intel Duo processor & 2GB of ram. OS is Ubuntu 10.04. I'm having problems with a C++ program that makes extensive use of realloc(). It happens that as soon as the overall memory allocated(OS +... (14 Replies)
Discussion started by: mamboknave
14 Replies

6. Programming

realloc fails in C : what next ?

Hi all I'm trying to use someone else's software, which has a realloc that fails in it. This is probably due to memory limitations, as it only happens when I use this software on huge datasets. First question : how to diagnose if it's a soft or hard limitation? I mean, if it's due to my... (10 Replies)
Discussion started by: jossojjos
10 Replies

7. Shell Programming and Scripting

Null Handling in Until loop. . .loop won't stop

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

8. Shell Programming and Scripting

Using variables created sequentially in a loop while still inside of the loop [bash]

I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends. As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

9. Programming

system() fails

Hi, I have the following code which fails with return value 1. sprintf(tmp, "rm -rf %s/* 2>/dev/null\n", dest); rc = system( tmp ); rc is 1 The files exist and the paths are correct. I can do a manual copy but the application fails. All the calls to system() function fail with the same... (6 Replies)
Discussion started by: mspaper
6 Replies

10. AIX

SCP fails sometimes

Hi, I got a unix script which copies a file from my AIX machine to a file server using SCP command. I am calling this script 3 times in my process after a time interval say 5mins. My issue here is like most of the time its not sending the file at the first time run while other 2 will work fine.... (10 Replies)
Discussion started by: vipinc
10 Replies
Login or Register to Ask a Question