not waiting...why?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting not waiting...why?
# 8  
Old 11-14-2008
Indeed, the 5 seconds was only a suggestion, good thing you fine-tuned the interval so that it works reliably. I am not sure, is it OK like this or are you still confused about something?
# 9  
Old 11-14-2008
It is a great thing to have a log file or else I never would have thought about that.

I'm confused to why the file is not created right away like it was before (even though it was not 100%) anymore. How does what we added change the file being created?

Why does the file take 15 seconds or so to show up after my program says it is complete? I know you probably are not familiar with the software but from my understanding of your code...

if the file is there then it gives an exit status of 0 and it goes into while loop which keeps checking the file until the old and new filesizes match. I don't see how the checking of the file has anything to do with the Compressor and the file not showing up or the delay of it showing up after completion.

Last thing, when the script is run a beach ball comes which restricts me clicking on things like my desktop items or whatever. This never happens with my other scripts. Do you see any reason why this is happening? I thought maybe it is because of the "&" in the script but I removed them and the wait and it still does it. Any ideas?
# 10  
Old 11-14-2008
I think the compress script is calling yet another program which it runs in the background. It does not wait for it to be finished however, and exits instead.
So when the compress script finishes with exit code 0, the actual program is still running in the background and the file is being created and is growing in size.

What we added does not change the file being created, but 'watches' it to see if the growing of he size of the file has stopped, i.e. two consecutive file size samples are the same. If the size no longer increases the script exits the wait loop and goes on to start quicktime.

I presume the beach ball means that your system is using 100% CPU while creating the file?
# 11  
Old 11-14-2008
O.K. I solved the beach ball problem. I have OMCEdit which allows me to do the context menus and get the variables and that was running the script in silent mode(popen)...I changed it to do Shell Script and it fixed it.

Thank you so much for your help. I have been trying to solve this for a couple months now and I couldn't find any solution. You are a real asset to this forum. Thanks so much.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Debian

Waiting for localhost.

I am getting the message - waiting for localhost. Here are some diagnostic steps I have tried .... root@meow:/home/ethan# cat /var/www/cgi-bin/httpd.conf ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/jkj ServerName 127.0.0.1:80 Listen xx.xx.xx.xx:80 Listen 127.0.0.1:80 ... (1 Reply)
Discussion started by: Meow613
1 Replies

2. HP-UX

Some I/O requests to this LV are waiting

Hi All I have a blade BL860c running on a C7000 chassis, in which is connected to a NetApp, so lately I am having I/O issues, and dmesg as well as syslog.log is reporting the following: /dev/vg01/lvol2 file system file data error in dev/block 0/55892768 Page I/O error occurred while paging... (2 Replies)
Discussion started by: fretagi
2 Replies

3. UNIX for Dummies Questions & Answers

Waiting for a file

I am such a newbie. I am from a mainframe background, so this stuff is new for me to interpret. I dont know if I need a sleep or wait. I need a loop to wait for a filea or fileb to be created before I execute further script. The driver unix script is on the solaris. The files I'm looking for... (1 Reply)
Discussion started by: Lillyt
1 Replies

4. Shell Programming and Scripting

not waiting

I have a script that runs Compressor and converts the file then I want it to inject the file with Flvtool2. My script works fine but the flvtool2 is starting too early. I have tried to put it in the background by putting a "&" sign at the end and then put a "wait" on a new line. Anyone have any... (2 Replies)
Discussion started by: mainegate
2 Replies

5. Shell Programming and Scripting

waiting

I have a text file which contain all the parameters need for scheduled jobs, then this "control" script would be called everynight at certain time while read line do $myScript.sh $line & pid=$! i=`expr $i + 1` done < $list then I need to wait until all... (1 Reply)
Discussion started by: mpang_
1 Replies

6. UNIX for Dummies Questions & Answers

Waiting between commands

Hello, Taking my scripting one step farther, I want to run a number of commands one after the other, but the system should wait between commands. How do I do this? Do I use the /wait command, or is it a function wait()? rsync command /wait tar command /wait move to a new folder /wait... (1 Reply)
Discussion started by: patwa
1 Replies

7. UNIX for Advanced & Expert Users

browser waiting

hi all i am opning a browser like www.example.com i would like to open this browser slowly (wait mode) how can i do this. is there any option like wait for some time that to 5sec.,10 sec. like (1 Reply)
Discussion started by: munna_dude
1 Replies

8. Shell Programming and Scripting

Looping and waiting

Hi Is it possible to have a script run in a loop (waiting for a change of state in the network interface), and if the loop continues for five minutes, to have it email the admin, and carry on in the loop? Here is my loop: #!/bin/bash STATE=`echo "show... (3 Replies)
Discussion started by: mikie
3 Replies

9. Shell Programming and Scripting

Waiting on a group

In the below artificially simplified script, I want to wait till after a, b, and c have been printed, before printing "finished." If you just want to wait on a single background process, you can use $! (pid of the last background process). But this doesn't work if there's more than one... (1 Reply)
Discussion started by: tphyahoo
1 Replies

10. Linux

waiting process

how to know the information of the waiting process how to calculate the time of the process that it has taken to execute i want to make a program that Should be able to keep a log of the processes expired(The log should contain the starting time, expiry time, time slices used, total execution... (2 Replies)
Discussion started by: shukla_chanchal
2 Replies
Login or Register to Ask a Question