Sponsored Content
Full Discussion: vi substitution help
Top Forums UNIX for Dummies Questions & Answers vi substitution help Post 302614489 by Peasant on Wednesday 28th of March 2012 02:22:50 PM
Old 03-28-2012
Or even shorter and less understandable Smilie
Code:
:%s#'\|-\|' ##g

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

substitution

I am trying to substituted a variable to a file using sed. However, the value of that variable is not being substituted. Here is an example of my code. lf=' ' v_whole="${1} ${2} ${3} $lf" cp ${IPPDIR}/ctl/fax_sub_text_a.${4}.${5}.txt... (1 Reply)
Discussion started by: supercbw
1 Replies

2. UNIX for Dummies Questions & Answers

Need help in substitution!!!!

In a file I want to globally change a "|" charater by a new line character. I am using the command 1,$s/\|/??/g Can anybody say what should I put in place of ?? in the above command? (3 Replies)
Discussion started by: uLearner
3 Replies

3. Shell Programming and Scripting

Substitution using SED

Hi , I am stuck up in the below scenario:- I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression. How can I use SED inside SHELL Scripting and command prompt as... (2 Replies)
Discussion started by: shubhranshu
2 Replies

4. Shell Programming and Scripting

SED Substitution

Hi , I am stuck up in the below scenario:- I need to read a file name (eg A.txt) name frm another file (eg B.txt) and then I need to search for a particular expression in A.txt and substitute it with another expression. How can I use SED inside SHELL Scripting and command prompt as well to... (1 Reply)
Discussion started by: shubhranshu
1 Replies

5. Shell Programming and Scripting

Difference between "Command substitution" and "Process substitution"

Hi, What is the actual difference between these two? Why the following code works for process substitution and fails for command substitution? while IFS= read -r line; do echo $line; done < <(cat file)executes successfully and display the contents of the file But, while IFS='\n' read -r... (3 Replies)
Discussion started by: royalibrahim
3 Replies

6. Shell Programming and Scripting

Substitution

All, I have this text document that contains a listing(See below). What i would like to ask is how i could extract just the information i need which is the files name (CWS*****.***.gz) If anyone has any suggestions i would be very grateful. I am sure its relatively simple but i just... (6 Replies)
Discussion started by: Andyp2704
6 Replies

7. UNIX for Dummies Questions & Answers

help with substitution

Hello, I have a file with 10,000+ records which look like this: Image3992170.tif 4/21/200811:42:09AM 3,373.13KB Image3993265.tif 4/11/20087:17:58PM 2,369.72KB Image3996764.tif 5/2/200811:01:28AM 2,155.87KB Image3997700.tif ... (4 Replies)
Discussion started by: lotusdeva
4 Replies

8. Shell Programming and Scripting

substitution help

How do i substitute ' with space in a file using sed or awk i am getting the following two scenarios 1) xyz'd with xyz d if i use sed 's/xyz\\\'d/xy z/g' it is taking ' after \ as closing expr for substitution 2) xyz';d with xyz d please advice (8 Replies)
Discussion started by: mad_man12
8 Replies

9. Shell Programming and Scripting

vi substitution

Hello, I'm trying to do a substitution in vi. which adds a field for the year to a line. If the line doesnt include a year, it should still add a field (although empty) the fields are: Country:number:number:name(and sometimes year):place this is a desired in and output: Sweden:55:32:John... (2 Replies)
Discussion started by: drareeg
2 Replies

10. Shell Programming and Scripting

Substitution

I am trying to do some substitutions using the substitution operator (:%s) in a text file. I want to replace all A1, A2, A3.......A100 in my text file. I used :%s/A2/SAE/g successfully until A9 but when I use A1, all the A11 to A19 is changed. How do I specify the exact match here? (8 Replies)
Discussion started by: Kanja
8 Replies
curl_multi_wait(3)						  libcurl Manual						curl_multi_wait(3)

NAME
curl_multi_wait - polls on all easy handles in a multi handle SYNOPSIS
#include <curl/curl.h> CURLMcode curl_multi_wait(CURLM *multi_handle, struct curl_waitfd extra_fds[], unsigned int extra_nfds, int timeout_ms, int *numfds); DESCRIPTION
curl_multi_wait(3) polls all file descriptors used by the curl easy handles contained in the given multi handle set. It will block until activity is detected on at least one of the handles or timeout_ms has passed. Alternatively, if the multi handle has a pending internal timeout that has a shorter expiry time than timeout_ms, that shorter time will be used instead to make sure timeout accuracy is reasonably kept. The calling application may pass additional curl_waitfd structures which are similar to poll(2)'s pollfd structure to be waited on in the same call. On completion, if numfds is non-NULL, it will be populated with the total number of file descriptors on which interesting events occurred. This number can include both libcurl internal descriptors as well as descriptors provided in extra_fds. If no extra file descriptors are provided and libcurl has no file descriptor to offer to wait for, this function will return immediately. This function is encouraged to be used instead of select(3) when using the multi interface to allow applications to easier circumvent the common problem with 1024 maximum file descriptors. curl_waitfd struct curl_waitfd { curl_socket_t fd; short events; short revents; }; CURL_WAIT_POLLIN Bit flag to curl_waitfd.events indicating the socket should poll on read events such as new data received. CURL_WAIT_POLLPRI Bit flag to curl_waitfd.events indicating the socket should poll on high priority read events such as out of band data. CURL_WAIT_POLLOUT Bit flag to curl_waitfd.events indicating the socket should poll on write events such as the socket being clear to write without blocking. EXAMPLE
CURL *easy_handle; CURLM *multi_handle; /* add the individual easy handle */ curl_multi_add_handle(multi_handle, easy_handle); do { CURLMcode mc; int numfds; mc = curl_multi_perform(multi_handle, &still_running); if(mc == CURLM_OK ) { /* wait for activity, timeout or "nothing" */ mc = curl_multi_wait(multi_handle, NULL, 0, 1000, &numfds); } if(mc != CURLM_OK) { fprintf(stderr, "curl_multi failed, code %d.0, mc); break; } /* 'numfds' being zero means either a timeout or no file descriptors to wait for. Try timeout on first occurrence, then assume no file descriptors and no file descriptors to wait for means wait for 100 milliseconds. */ if(!numfds) { repeats++; /* count number of repeated zero numfds */ if(repeats > 1) { WAITMS(100); /* sleep 100 milliseconds */ } } else repeats = 0; } while(still_running); curl_multi_remove_handle(multi_handle, easy_handle); RETURN VALUE
CURLMcode type, general libcurl multi interface error code. See libcurl-errors(3) AVAILABILITY
This function was added in libcurl 7.28.0. SEE ALSO
curl_multi_fdset(3), curl_multi_perform(3) libcurl 7.54.0 March 09, 2016 curl_multi_wait(3)
All times are GMT -4. The time now is 04:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy