Sponsored Content
Full Discussion: Merge matrices
Top Forums UNIX for Dummies Questions & Answers Merge matrices Post 302926182 by senhia83 on Friday 21st of November 2014 04:14:27 PM
Old 11-21-2014
thanks a lot, I also need the headers as the filenames, I can do that manually for a small set but is it simple to add that to the code?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file merge

Hi, I have 3 files. The containts of the files are as followes. File 1: 1 2 3 File 2: A B C File 3: Ind US Aus (6 Replies)
Discussion started by: siba.s.nayak
6 Replies

2. Shell Programming and Scripting

Merge all commands into one

how can i merge follwoing process to one... tail +5 rawdata_AAA_1.txt_$$ | grep -v "^$" >> rawdata_AAA_2.txt_$$ For discarding first 5 rows and deleting null rows awk '!/^ /{if(a) print a; a=$0}/^ /{print a}' rawdata_AAA_2.txt >> rawdata_AAA_3.txt For merging record if it split into 2 rows... (8 Replies)
Discussion started by: Amit.Sagpariya
8 Replies

3. Shell Programming and Scripting

Merge 2 files

Hello, i'd like a bash script to merge 2 files without duplicate lines. Example : file1 : toto titi file2 : toto tata Expected result, file3 : toto (5 Replies)
Discussion started by: Celmar
5 Replies

4. UNIX for Dummies Questions & Answers

How to merge number?

hi everyone I try to make script to help my work on Centos my data is number in 1 colum like below 1 2 3 4 5 6 9 10 11 15 18 I want result show in new file like 1-6,9-11,15,18 (5 Replies)
Discussion started by: GeodusT
5 Replies

5. UNIX for Advanced & Expert Users

How to merge two commands

I have input like Unload: 2610000 225 2198 374 315 420 1149 57 2611 595 662 374 820 130 2938 486 2483 397 760 using these values, i need to divide first number with second number, means 225/2198, and using the value i'm trying to sort it. After sort i need first and "Unload" values,... (2 Replies)
Discussion started by: arivu198314
2 Replies

6. Shell Programming and Scripting

merge two different files

HI I have input file as date 22jan2011 calc 0 667788.1 998877.2 vals 1 222 444 666 777 999 vals 2 222 444 666 777 999 vals 3 ... (3 Replies)
Discussion started by: Indra2011
3 Replies

7. Shell Programming and Scripting

column merge same value

Dear All, I have the following file: file1 "1" 189218400 189221399 3000 "0041 ENSMUSG00000000031" "0041" "+" "ENSMUSG00000000031" 189039418 189175306 "downstream" 178982 43094 "NearestStart" "1" 197067200 197068353 1154 "0057... (3 Replies)
Discussion started by: paolo.kunder
3 Replies

8. UNIX for Advanced & Expert Users

Vector base Cosine Similarity for two Matrices -- R in UNIX

Dear All, I am facing a problem and I would be Thankful if you can help Hope this is the right place to ask this question I have two matrices of (row=10, col=3) and I want to get the cosine similarity between two lines (vectors) of each file --> the result should be (10,1) of cosine measures I... (10 Replies)
Discussion started by: A-V
10 Replies

9. Programming

Merge .lo into .so

Good day to everyone. I've built an libxml2 from sources. I can not install it in a proper way with using repository due to I have not sudo privilegies. I've got a set of .lo files. Is there a simple way to merge it in one .so or .a file? (2 Replies)
Discussion started by: z7ql
2 Replies

10. UNIX for Dummies Questions & Answers

Multiplication of two matrices

Hi there! I have two files like below File1(with a header, ~1000 rows, ~50 columns) ID1 ID2 ID3 ID4 ID5 MI1_A MI1_H MI2_A MI2_H 0 1 0 0 0 1 0 2 1 0 2 0 0 0 2 1 0 1 File2 (without a header, ~50 rows) MI1 A 0.4 3.1 MI2 B -0.2 0.1 Output ID2 M1_A M2_A 1 1*0.4 2*-0.2 2 2*0.4 0*-0.2 ... (22 Replies)
Discussion started by: Akang
22 Replies
CURLOPT_HTTPHEADER(3)					     curl_easy_setopt options					     CURLOPT_HTTPHEADER(3)

NAME
CURLOPT_HTTPHEADER - set custom HTTP headers SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HTTPHEADER, struct curl_slist *headers); DESCRIPTION
Pass a pointer to a linked list of HTTP headers to pass to the server and/or proxy in your HTTP request. The same list can be used for both host and proxy requests! The linked list should be a fully valid list of struct curl_slist structs properly filled in. Use curl_slist_append(3) to create the list and curl_slist_free_all(3) to clean up an entire list. If you add a header that is otherwise generated and used by libcurl internally, your added one will be used instead. If you add a header with no content as in 'Accept:' (no data on the right side of the colon), the inter- nally used header will get disabled. With this option you can add new headers, replace internal headers and remove internal headers. To add a header with no content (nothing to the right side of the colon), use the form 'MyHeader;' (note the ending semicolon). The headers included in the linked list must not be CRLF-terminated, because libcurl adds CRLF after each header item. Failure to comply with this will result in strange bugs because the server will most likely ignore part of the headers you specified. The first line in a request (containing the method, usually a GET or POST) is not a header and cannot be replaced using this option. Only the lines following the request-line are headers. Adding this method line in this list of headers will only cause your request to send an invalid header. Use CURLOPT_CUSTOMREQUEST(3) to change the method. When this option is passed to curl_easy_setopt(3), libcurl will not copy the entire list so you must keep it around until you no longer use this handle for a transfer before you call curl_slist_free_all(3) on the list. Pass a NULL to this option to reset back to no custom headers. The most commonly replaced headers have "shortcuts" in the options CURLOPT_COOKIE(3), CURLOPT_USERAGENT(3) and CURLOPT_REFERER(3). We rec- ommend using those. There's an alternative option that sets or replaces headers only for requests that are sent with CONNECT to a proxy: CURLOPT_PROXY- HEADER(3). Use CURLOPT_HEADEROPT(3) to control the behavior. SECURITY CONCERNS
By default, this option makes libcurl send the given headers in all HTTP requests done by this handle. You should therefore use this option with caution if you for example connect to the remote site using a proxy and a CONNECT request, you should to consider if that proxy is supposed to also get the headers. They may be private or otherwise sensitive to leak. Use CURLOPT_HEADEROPT(3) to make the headers only get sent to where you intend them to get sent. DEFAULT
NULL PROTOCOLS
HTTP EXAMPLE
CURL *curl = curl_easy_init(); struct curl_slist *list = NULL; if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); list = curl_slist_append(list, "Shoesize: 10"); list = curl_slist_append(list, "Accept:"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, list); curl_easy_perform(curl); curl_slist_free_all(list); /* free the list again */ } AVAILABILITY
As long as HTTP is enabled RETURN VALUE
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_CUSTOMREQUEST(3), CURLOPT_HEADEROPT(3), CURLOPT_PROXYHEADER(3), CURLOPT_HEADER(3) libcurl 7.54.0 February 03, 2016 CURLOPT_HTTPHEADER(3)
All times are GMT -4. The time now is 05:32 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy