05-27-2014
Do you think this matches with your initial requirement?
Quote:
Awesome. But My actual case is little different.
Why couldn't you post this actual case previously.
This User Gave Thanks to clx For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am using sed to replace things like "," and tabs in a file, but what is the code for replacing a \ ???? (5 Replies)
Discussion started by: rjsha1
5 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I am facing a strange situation and want to find why it is occuring . When i convert the whole line into Hexadecimal character i can find the junk value after new line (\n) . If i look in binary mode it is not visible.
PLease let me know how possible the junk character is added... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
3. Shell Programming and Scripting
Hi All,
I'm trying to write a ksh script to parse a file. When the "\" character is encountered, it should be removed and the next line should be concatenated with the current line. For example...
this is a test
line #1\
should be concatenated with line #2\
and line number 3
when this... (3 Replies)
Discussion started by: newbie_coder
3 Replies
4. UNIX for Dummies Questions & Answers
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
5. UNIX for Advanced & Expert Users
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
6. Shell Programming and Scripting
Hi!!..
I would like to know what is maximum character size for a command in the "sh" or "bourne" shell?
Thanks in advance..
Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies
7. Shell Programming and Scripting
Hi,
My input has much more lines, but few of them are below
pin(IDF) {
direction : input;
drc_pinsigtype : signal;
pin(SELDIV6) {
direction : input;
drc_pinsigtype : ... (3 Replies)
Discussion started by: nehashine
3 Replies
8. Shell Programming and Scripting
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
Discussion started by: haggismn
10 Replies
9. UNIX for Dummies Questions & Answers
Hi All
It's me again with another huge txt files. :confused:
What I have:
- I have 33 huge txt files in a folder.
- I have thousands of line in this txt file which contain many the letter "x" in them.
- Some of them have more than one "x" character in the line.
What I want to achieve:... (8 Replies)
Discussion started by: Nexeu
8 Replies
10. Shell Programming and Scripting
I'd like to put paragraph breaks \n\n randomly between 5 - 10 occurrences of the dot character (.), for an entire text file. How to do that?
In other words, anywhere between every 5 -10 sentences, a new paragraph will generate. There are no other uses of the (.) except for sentence breaks in... (11 Replies)
Discussion started by: p1ne
11 Replies
LEARN ABOUT OSX
curl_formget
curl_formget(3) libcurl Manual curl_formget(3)
NAME
curl_formget - serialize a previously built multipart/formdata HTTP POST chain
SYNOPSIS
#include <curl/curl.h>
void curl_formget(struct curl_httppost * form, void *userp,
curl_formget_callback append );
DESCRIPTION
curl_formget() is used to serialize data previously built/appended with curl_formadd(3). Accepts a void pointer as second argument named
userp which will be passed as the first argument to the curl_formget_callback function.
typedef size_t (*curl_formget_callback)(void *userp, const char *buf, size_t len);
The curl_formget_callback will be executed for each part of the HTTP POST chain. The character buffer passed to the callback must not be
freed. The callback should return the buffer length passed to it on success.
If the CURLFORM_STREAM option is used in the formpost, it will prevent curl_formget(3) from working until you've performed the actual HTTP
request as only then will libcurl get the actual read callback to use!
RETURN VALUE
0 means everything was ok, non-zero means an error occurred
EXAMPLE
size_t print_httppost_callback(void *arg, const char *buf, size_t len)
{
fwrite(buf, len, 1, stdout);
(*(size_t *) arg) += len;
return len;
}
size_t print_httppost(struct curl_httppost *post)
{
size_t total_size = 0;
if(curl_formget(post, &total_size, print_httppost_callback)) {
return (size_t) -1;
}
return total_size;
}
AVAILABILITY
This function was added in libcurl 7.15.5
SEE ALSO
curl_formadd(3)
libcurl 7.15.5 20 June 2006 curl_formget(3)