Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Using exit in For Loop - Is this acceptable Post 302993436 by RudiC on Thursday 9th of March 2017 04:30:38 PM
Old 03-09-2017
If you have full access to the startMaxl.sh script, consider making the extra parameter the last one - that would make parameter handling way easier as every parameter would have the same position.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

csh exit while loop on keystroke

#!/bin/csh I'm using a `while(1)` loop to dispaly real-time information about various files on my system, and I use ^C to exit it when needed. I was hoping there was a way to exit the script on a normal keystroke such as "q". Can someone point me in the right direction? I'm willing to use a... (7 Replies)
Discussion started by: seg
7 Replies

2. Shell Programming and Scripting

while loop exit

i wrote a while script as part of a huge program. this script, once picked, begins to output data to the person using it. pretty easy, as the person doesn't have to keep typing commands to get the output that the while loop automatically throws out. now, the thing is, while this while-script... (3 Replies)
Discussion started by: Terrible
3 Replies

3. Shell Programming and Scripting

Method to exit a for loop

Hi All, Can someone let me know how i can exit a for loop without exiting the script itself .... will the break statement work .... please help .... -Regards (2 Replies)
Discussion started by: Rohini Vijay
2 Replies

4. Shell Programming and Scripting

how to exit a while true loop

Hi guys, I'm new to unix but loving it!! BUT this is driving me nuts as i can't work out the best way to do it. I have a while true loop that i use to monitor something. For my own reasons in ths script i have disabled the CTRL C using the trap command. But i want to put in a option to exit... (5 Replies)
Discussion started by: Noob e
5 Replies

5. Shell Programming and Scripting

exit out of a while loop with error

im running a while loop as a file watcher, with incremental counter on the retries..however when the retries reach it's limit i want it exit and echo and error and stop the batch. Im not sure the code i have will do that already... Here is what i have that works: #!/usr/bin/ksh count=0... (2 Replies)
Discussion started by: sigh2010
2 Replies

6. Shell Programming and Scripting

Exit from loop only when selected

I am trying to get my program to exit when the answer to my question is positive, if I am asking if the answers are correct in the entries that the user inputted and the user says no how do I then have it exit? If they say everything is correct then it continue into the program, I think I am close... (2 Replies)
Discussion started by: gumbi17
2 Replies

7. Shell Programming and Scripting

Exit from loop

hi, how to exit from "if" loop?actually i have mutliple "if" conditions, i have to exit from each "if" loop,if it is true...:confused: Please suggest me... (3 Replies)
Discussion started by: sreelu
3 Replies

8. Shell Programming and Scripting

Loop exit control

Hi I would like to exit the loop below on <Enter> even if it sleeps. Is it possible? while true do my_procedure; sleep 60 done Thanks (7 Replies)
Discussion started by: zam
7 Replies

9. Shell Programming and Scripting

Strange exit of while loop

This code is used to check for duplicate ip and hostnames in an /etc/hosts file CENTRAL is path to /etc/hosts AWK =awk #check CENTRAL for duplicate ips or hostnames# grep -v "^#" $CENTRAL | $AWK '{ print $1, $2; }' | \ while read ip hostname do if... (5 Replies)
Discussion started by: trimike
5 Replies

10. Emergency UNIX and Linux Support

For loop exit

Below for loop not exiting. Can someone help? JBOSS_INST_ARGS=01 02 if ; then for i in $JBOSS_INST_ARGS; do /u/jboss-6.1.0.Final/bin/jboss_init_wise$i.sh start; done (8 Replies)
Discussion started by: vino_hymi
8 Replies
curl_share_setopt(3)						  libcurl Manual					      curl_share_setopt(3)

NAME
curl_share_setopt - Set options for a shared object SYNOPSIS
#include <curl/curl.h> CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter); DESCRIPTION
Set the option to parameter for the given share. OPTIONS
CURLSHOPT_LOCKFUNC The parameter must be a pointer to a function matching the following prototype: void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access, void *userptr); data defines what data libcurl wants to lock, and you must make sure that only one lock is given at any time for each kind of data. access defines what access type libcurl wants, shared or single. userptr is the pointer you set with CURLSHOPT_USERDATA. CURLSHOPT_UNLOCKFUNC The parameter must be a pointer to a function matching the following prototype: void unlock_function(CURL *handle, curl_lock_data data, void *userptr); data defines what data libcurl wants to unlock, and you must make sure that only one lock is given at any time for each kind of data. userptr is the pointer you set with CURLSHOPT_USERDATA. CURLSHOPT_SHARE The parameter specifies a type of data that should be shared. This may be set to one of the values described below. CURL_LOCK_DATA_COOKIE Cookie data will be shared across the easy handles using this shared object. CURL_LOCK_DATA_DNS Cached DNS hosts will be shared across the easy handles using this shared object. Note that when you use the multi interface, all easy handles added to the same multi handle will share DNS cache by default without this having to be used! CURL_LOCK_DATA_SSL_SESSION SSL session IDs will be shared across the easy handles using this shared object. This will reduce the time spent in the SSL handshake when reconnecting to the same server. Note SSL session IDs are reused within the same easy handle by default. CURLSHOPT_UNSHARE This option does the opposite of CURLSHOPT_SHARE. It specifies that the specified parameter will no longer be shared. Valid values are the same as those for CURLSHOPT_SHARE. CURLSHOPT_USERDATA The parameter allows you to specify a pointer to data that will be passed to the lock_function and unlock_function each time it is called. RETURN VALUE
CURLSHE_OK (zero) means that the option was set properly, non-zero means an error occurred as <curl/curl.h> defines. See the libcurl- errors.3 man page for the full list with descriptions. SEE ALSO
curl_share_cleanup(3), curl_share_init(3) libcurl 7.10.7 8 Aug 2003 curl_share_setopt(3)
All times are GMT -4. The time now is 10:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy