02-20-2014
Call a UNIX script inside another and dont wait for it
Hi
I have two scripts script1.sh and script2.sh(say this script is a long running).
I want to call script2.sh inside and script1.sh,but when i call script2.sh i dont want to wait for script2 to complete and want this to run in back ground and go on next commands in script 1.sh and finally at the end want to check for script2 process ? I need the
- syntax to call script2 in script which doesnt wait and runs in back ground
- check for script 2 is complete at end of script 1
Would appreciate if someone can give a psuedo code for this
Thanks in advance
Matt
10 More Discussions You Might Find Interesting
1. Programming
hi there,
i had some trivial questions about this program here. i am kinda confused with these, hope you can help me to understand here. :)
#include<stdio.h>
#include<sys/wait.h>
#include<sys/types.h>
#include<unistd.h>
int main(void)
{
int... (2 Replies)
Discussion started by: a25khan
2 Replies
2. Shell Programming and Scripting
Dear Freinds,
Help needed in input redirection .
My problem is as follows..
I have a shell script as follows which calls another gnuplot script .
datagen.sh
#!/bin/ksh
gnuplot plot_I.plt
In the above file I am calling another file called plot_I.plt which reside in the same... (4 Replies)
Discussion started by: user_prady
4 Replies
3. Shell Programming and Scripting
Hi all,
I have the following snippet of code..
#!/bin/sh
echo "run perl script............"
#Run the verification script
perl bill_ver
echo " perl script completed....."
echo "rename files......"
#Remove from all file in the directories test, test1, test2, test3
for f in... (3 Replies)
Discussion started by: chriss_58
3 Replies
4. Shell Programming and Scripting
Hi all,
I'm trying to run an sql inside a loop which looks like this
#!bin/ksh
while IFS=, read var1 var2
do
sqlplus -s ${USERNAME}/${PASSWORD}@${ORACLE_SID} << EOF
insert into ${TABLE}
(
appt_date
)
values
(
'${var1 }'
);
... (6 Replies)
Discussion started by: ryukishin_17
6 Replies
5. Shell Programming and Scripting
Hi,
Requirement:-
I have 3 scripts(say A.sh,B.sh & C.sh).Now am executing these 3 scripts seperately.requirement is to run these 3 scripts as single from one main script,this script has to call A.sh and if A.sh executed completely,it has to invoke B.sh and like the 3 rd one.And while... (5 Replies)
Discussion started by: Sanal
5 Replies
6. Programming
i made this program but when i compile this code, compiler make this error, is an error on wait() system call but argumenti is right, or not?:
esercizio.c:80:9: error: incompatible type for argument 1 of ‘wait'
/usr/include/i386-linux-gnu/sys/wait.h:116:16: note: expected ‘__WAIT_STATUS' but... (4 Replies)
Discussion started by: tafazzi87
4 Replies
7. Shell Programming and Scripting
Hi,
I am facing a strange issue,
when i call a script from my while loop in background it doesnt go in background, despite the wait i put below the whil loop it goes forward even before the process put in background is completed.
cat abc.txt | while read -u4 line
do
#if line contains #... (2 Replies)
Discussion started by: mihirvora16
2 Replies
8. UNIX for Advanced & Expert Users
I am running the xampp on WINDOWS, and my php script is connecting to a unix script on a different server (ssh2_connect("11.31.138.56", 22). I am running the unix script and inside this script I am calling the .sql file . The SQL is connecting to oracle db on the unix server.
But the sqlplus... (2 Replies)
Discussion started by: madfox
2 Replies
9. Shell Programming and Scripting
I know this question is out there in many forums, but I tried all the combinations in vain.
I'm basically trying to call a sql script from a shell script.
Below is my sql script (plsql.sql)
DELCARE
v_empno NUMBER := '&empno';
BEGIN
select ename,sal from emp where empno = v_empno;... (3 Replies)
Discussion started by: FName_LName
3 Replies
10. Shell Programming and Scripting
Hello All,
My name is vasu and I am very new to Unix scripting, i know basic commands, but now i need to write the following script, i have tried but no luck
My requirment is i am getting one our from another command as following
Used:1.8TB Advisory Quota:1.8TB aaa1
Used:4.5TB Advisory... (1 Reply)
Discussion started by: VasuKukkapalli
1 Replies
LEARN ABOUT LINUX
curl_multi_timeout
curl_multi_timeout(3) libcurl Manual curl_multi_timeout(3)
NAME
curl_multi_timeout - how long to wait for action before proceeding
SYNOPSIS
#include <curl/curl.h>
CURLMcode curl_multi_timeout(CURLM *multi_handle, long *timeout);
DESCRIPTION
An application using the libcurl multi interface should call curl_multi_timeout(3) to figure out how long it should wait for socket actions
- at most - before proceeding.
Proceeding means either doing the socket-style timeout action: call the curl_multi_socket_action(3) function with the sockfd argument set
to CURL_SOCKET_TIMEOUT, or call curl_multi_perform(3) if you're using the simpler and older multi interface approach.
The timeout value returned in the long timeout points to, is in number of milliseconds at this very moment. If 0, it means you should pro-
ceed immediately without waiting for anything. If it returns -1, there's no timeout at all set.
An application that uses the multi_socket API SHOULD not use this function, but SHOULD instead use curl_multi_setopt(3) and its CURL-
MOPT_TIMERFUNCTION option for proper and desired behavior.
Note: if libcurl returns a -1 timeout here, it just means that libcurl currently has no stored timeout value. You must not wait too long
(more than a few seconds perhaps) before you call curl_multi_perform() again.
RETURN VALUE
The standard CURLMcode for multi interface error codes.
TYPICAL USAGE
Call curl_multi_timeout(3), then wait for action on the sockets. You figure out which sockets to wait for by calling curl_multi_fdset(3) or
by a previous call to curl_multi_socket(3).
AVAILABILITY
This function was added in libcurl 7.15.4.
SEE ALSO
curl_multi_fdset(3), curl_multi_info_read(3), curl_multi_socket(3), curl_multi_setopt(3)
libcurl 7.16.0 2 Jan 2006 curl_multi_timeout(3)