wait doesn't work, I tried that. sleep might work most of the time, but it isn't a guarantee that the work would be done after sleeping.
I wrote up the following to do what I want, it works but I guess I was hoping for a more elegant solution like a simple flag for wait or something.
Which produces the following output:
With the above code multiple >(cmd) arguments can be given to tee and each would echo a statement to the 7 filedescriptor when they're complete. The while loop condition would just be adjusted to wait for however many processes you have launched using >(cmd).
I'm using PERL on windows NT to try to run an extract of data. I have multiple zip files in multiple locations. I am extracting "*.t" from zip files and subsequently adding that file to one zip file so when the script is complete I should have one zip file with a whole bunch of ".t" files in it.
... (2 Replies)
I am attempting within a for-loop, to have my shell script (Solaris v8 ksh) wait until a copy file command to complete before continueing. The specific code is:
for files in $(<inputfile.lst)
do
mv directory/$files directory/$files
ksh -m -i bg %%
wait $!
done
I am shaky on the... (3 Replies)
Does anyone have an example of a korn shell scripts kicking of multiple background processes and then using the wait command to get the return code from those processes?
I want to write a program that kicks off multiple Oracle procedures and then wait for the return code before I procede.... (1 Reply)
As far as I can tell, the bash wait command waits for a logical "AND" of all the child processes.
Assuming I am coding in C:
(1) What is the function I would use to create multiple bash child process running perl?
(2) What is the function I would use to reinvent the bash wait command so I... (4 Replies)
Did not use 'wait' yet.
How I understand by now the wait works only for child processes, started background.
Is there any other way to watch completion of any, not related process (at least, a process, owned by the same user?)
I need to start a background process, witch will be waiting... (2 Replies)
Hi All,
Am finding performance of my SD card using hdparm.
hdparm -tT /dev/BlockDev0
/dev/BlockDev0:
Timing cached reads: 1118 MB in 2.00 seconds = 558.61 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate
ioctl for device
Timing buffered disk reads: 14... (0 Replies)
Hi, Is there any way to know the child process status as and when it finished. If i write like below
nohup sh a1.sh & ### has sleep 20 ;echo a1.sh
nohup sh a2.sh & ### has sleep 10 ;echo a2.sh
nohup sh a3.sh & ### has sleep 5 ;echo a3.sh
wait
This will wait till a1.sh ,a2.sh a3.sh... (0 Replies)
Let's say I start process A.sh, then start process B.sh. I call both of them in my C.sh
How can I make sure that B starts its execution only after A.sh finishes.
I have to do this in loop.Execution time of A.sh may vary everytime.
It is a parameterized script. (17 Replies)
Hi All,
I have a question related to Shell scripting. In my shell script, I have following two commands in sequence:
sed 's/^/grep "^120" /g' $ORIGCHARGEDAMTLIST|sed "s;$;| cut -f$FIELD_NO1 -d '|' | awk '{ sum+=\$1} END {printf (\"%0.2f\\\n\", sum/100)}' >$TEMPFILE
mv $TEMPFILE $ORIGFILE... (3 Replies)
Hello,
im having bash script with
while ***
command1 &&
command2 &&
command3 &&
done
i want to ask how i can prevent overloading server, by waiting untill all commands complete? any low resources intensive command like "wait" - i dont know if exist? (2 Replies)
Discussion started by: postcd
2 Replies
LEARN ABOUT DEBIAN
bping
BPING(1) BP executables BPING(1)NAME
bping - Send and receive Bundle Protocol echo bundles.
SYNOPSIS
bping [-c count] [-i interval] [-p priority] [-q wait] [-r flags] [-t ttl] srcEID destEID [reporttoEID]
DESCRIPTION
bping sends bundles from srcEID to destEID. If the destEID echoes the bundles back (for instance, it is a bpecho endpoint), bping will
print the round-trip time. When complete, bping will print statistics before exiting. It is very similar to ping, except it works with
the bundle protocol.
bping terminates when one of the following happens: it receives the SIGINT signal (Ctrl+C), it receives responses to all of the bundles it
sent, or it has sent all count of its bundles and waited wait seconds.
EXIT STATUS
These exit statuses are taken from ping.
0 bping has terminated normally, and received responses to all the packets it sent.
1 bping has terminated normally, but it did not receive responses to all the packets it sent.
2 bping has terminated due to an error. Details should be noted in the ion.log log file.
FILES
No configuration files are needed.
ENVIRONMENT
No environment variables apply.
DIAGNOSTICS
Diagnostic messages produced by bping are written to the ION log file ion.log and printed to standard error. Diagnostic messages that
don't cause bping to terminate indicate a failure parsing an echo response bundle. This means that destEID isn't an echo endpoint: it's
responding with some other bundle message of an unexpected format.
Can't attach to BP.
bpadmin has not yet initialized Bundle Protocol operations.
Can't open own endpoint.
Another application has already opened ownEndpointId. Terminate that application and rerun.
bping bundle reception failed.
BP system error. Check for earlier diagnostic messages describing the cause of the error; correct problem and rerun.
No space for ZCO extent.
ION system error. Check for earlier diagnostic messages describing the cause of the error; correct problem and rerun.
Can't create ZCO.
ION system error. Check for earlier diagnostic messages describing the cause of the error; correct problem and rerun.
bping can't send echo bundle.
BP system error. Check for earlier diagnostic messages describing the cause of the error; correct problem and rerun.
BUGS
Report bugs to <ion-bugs@korgano.eecs.ohiou.edu>
SEE ALSO bpecho(1), bptrace(1), bpadmin(1), bp(3), ping(8)perl v5.14.2 2012-05-25 BPING(1)