Ok I have the code down to about the smallest I can and still show you what is happening. The include.php is simply the databsae connection details. With the data I have the query returns 53068 rows. You call the script with the argument 0, 1 or 2 to use the 3 different queries (For 2, 3 or 4 total columns returned). With 0 or 1 the script exits immedaitely after printing 'Exiting', with 2 there is an 18-20 second delay.
The columns returned are:
date: a date/time stamp
r_per_sec: A floating point numer
b_workers: An integer
I_workers: An integer
If I comment out any one of the three lines marked "*KEY LINE*" then the script exits immediately.
Ouput from my system when running the above script 3 times:
Hi Friends,
Is it possible to exit nicely(ie, to echo a message with the error occurred) from a shell script(quiet a big one :)) once it encounter an error in between the lines?
For example, in my script I am calling the command mkdir and sometimes (when the directory already exists) it... (4 Replies)
there are many script in my project.i am having a problem when i am trying to quit from child script.what is the command to wrap up all the parent script and calling script as well? exit 0 is not working.please help.... (1 Reply)
I have a script which has the following statement,
/opt/oracle/product/9i/bin/sqlplus << EOC >> $LOG_FILE 2>&1
username/password ---- Enters the SQL prompt
@/export/home/oracle/shells/grant_userview.sql ---Runs the SQL script
@/export/home/oracle/shells/grant_proc_userview.sql ---Runs the... (6 Replies)
Hi,
I am trying to exit the script from a function.
I was in assumption that if we use exit ( inside or outside the function) it will exit from the script.
alternatively, return will exit from that particular function.
but in my case, exit is exiting from the function and not the script.... (8 Replies)
I have a script planned for the Helpdesk to allow them to (on a couple of RHEL 3 / RHEL 5 servers) reset passwords, stop / start printers, and clear print queues. The appropriate sudo permissions were given to their accounts, and the individual functions all work just fine. The ability to move... (0 Replies)
I have to write a script in ksh which again should call another script. Say A.ksh is calling B.ksh. Now in B.ksh if the condition we are checking for is true then we have to go back to the main script A.ksh or if the condition in B.ksh is false then we have to totally come out of the scripts.
I... (1 Reply)
Hi Team,
Need your help for the below code snippet. I wrote a module to read the file names remote server using file name convention.
Issue : My script is coming out from while loop without reading complete file.
test1()
{
while read line
do
echo $line
file_nm_convention=`echo... (3 Replies)
Hi,
I am using SCO Unix. I write a script to execute a program by calling
exec program
The script will check the program is still there or not, if not, then it will exit the script by calling
exit
So if I press DEL to quit the program, the script will exit, but it will logout... (6 Replies)