Sponsored Content
Full Discussion: Merge two files by condition
Top Forums Shell Programming and Scripting Merge two files by condition Post 302715045 by Scrutinizer on Saturday 13th of October 2012 03:30:18 PM
Old 10-13-2012
You can append > C to write the output to file "C"
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help in merge files

I have created these files in a particular directory a_1.txt a_2.txt ... .. a_n.txt Each file has a single line. I want to write a output file a.txt, which will have concantated value of string from all the files. which utility should i use. copy, cat or paste???? Can anyone help... (5 Replies)
Discussion started by: u263066
5 Replies

2. Shell Programming and Scripting

how to merge these two files?

I have two files, each of them has 12 lines, fileA has 3 columns, fileB has 1 column, like the following FileA a 1 b 2 c 3 ..blabla FileB A B C ..blabla Now I am trying to put the content of fileB as column 3 of fileA, e.g. a 1 A b 2 B c 3 C (3 Replies)
Discussion started by: fedora
3 Replies

3. Shell Programming and Scripting

Merge files of differrent size with one field common in both files using awk

hi, i am facing a problem in merging two files using awk, the problem is as stated below, file1: A|B|C|D|E|F|G|H|I|1 M|N|O|P|Q|R|S|T|U|2 AA|BB|CC|DD|EE|FF|GG|HH|II|1 .... .... .... file2 : 1|Mn|op|qr (2 Replies)
Discussion started by: shashi1982
2 Replies

4. Shell Programming and Scripting

merge files

hi i have two files file1 1234567 1234678 1234679 file2 98765|jjkskk|9393|iyutr 98765|kkooo|9393|hjjjd 98765|abcvfg|9393|sskds output should be 1234567|jjkskk|9393|iyutr 1234678|kkooo|9393|hjjjd 1234679|abcvfg|9393|sskds (5 Replies)
Discussion started by: mad_man12
5 Replies

5. 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

6. Shell Programming and Scripting

How to compare 2 files & get only few columns based on a condition related to both files?

Hiiiii friends I have 2 files which contains huge data & few lines of it are as shown below File1: b.dat(which has 21 columns) SSR 1976 8 12 13 10 44.00 39.0700 70.7800 7.0 0 0.00 0 2.78 0.00 0.00 0 0.00 2.78 0 NULL ISC 1976 8 12 22 32 37.39 36.2942 70.7338... (6 Replies)
Discussion started by: reva
6 Replies

7. UNIX for Dummies Questions & Answers

Merge files

Hi, I would like to know how can I merge files based on their coordinates, but mantaining the score of each file in the output file like: Note: 1st column is for chromosome, 2nd for start, 3rd for end of segment, 4th for score file1: 1 200 300 20 1 400 500 30 file2: 1 200 350 30 1... (1 Reply)
Discussion started by: fadista
1 Replies

8. Shell Programming and Scripting

Checking in a directory how many files are present and basing on that merge all the files

Hi, My requirement is,there is a directory location like: :camp/current/ In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)
Discussion started by: srikanth_sagi
10 Replies

9. Shell Programming and Scripting

How to merge two files?

Hi Gurus, I have two files as below file1 abc cde cdd cdf file2 123 234 345 456 I want to get abc 123 cde 234 cdd 345 (3 Replies)
Discussion started by: ken6503
3 Replies

10. Shell Programming and Scripting

Merge files and generate a resume in two files

Dear Gents, Please I need your help... I need small script :) to do the following. I have a thousand of files in a folder produced daily. I need first to merge all files called. txt (0009.txt, 0010.txt, 0011.txt) and and to output a resume of all information on 2 separate files in csv... (14 Replies)
Discussion started by: jiam912
14 Replies
ldns(3) 						     Library Functions Manual							   ldns(3)

NAME
ldns_pkt2buffer_str, ldns_pktheader2buffer_str, ldns_rr2buffer_str, ldns_rr_list2buffer_str, ldns_rdf2buffer_str, ldns_key2buffer_str, ldns_pkt2buffer_wire, ldns_rr2buffer_wire, ldns_rdf2buffer_wire, ldns_rrsig2buffer_wire, ldns_rr_rdata2buffer_wire- SYNOPSIS
#include <stdint.h> #include <stdbool.h> #include <ldns/ldns.h> ldns_status ldns_pkt2buffer_str(ldns_buffer *output, const ldns_pkt *pkt); ldns_status ldns_pktheader2buffer_str(ldns_buffer *output, const ldns_pkt *pkt); ldns_status ldns_rr2buffer_str(ldns_buffer *output, const ldns_rr *rr); ldns_status ldns_rr_list2buffer_str(ldns_buffer *output, const ldns_rr_list *list); ldns_status ldns_rdf2buffer_str(ldns_buffer *output, const ldns_rdf *rdf); ldns_status ldns_key2buffer_str(ldns_buffer *output, const ldns_key *k); ldns_status ldns_pkt2buffer_wire(ldns_buffer *output, const ldns_pkt *pkt); ldns_status ldns_rr2buffer_wire(ldns_buffer *output, const ldns_rr *rr, int section); ldns_status ldns_rdf2buffer_wire(ldns_buffer *output, const ldns_rdf *rdf); ldns_status ldns_rrsig2buffer_wire(ldns_buffer *output, const ldns_rr *sigrr); ldns_status ldns_rr_rdata2buffer_wire(ldns_buffer *output, const ldns_rr *rr); DESCRIPTION
ldns_pkt2buffer_str() Converts the data in the DNS packet to presentation format (as char *) and appends it to the given buffer output: pointer to the buffer to append the data to pkt: the pointer to the packet to convert Returns status ldns_pktheader2buffer_str() Converts the header of a packet to presentation format and appends it to the output buffer output: the buffer to append output to pkt: the packet to convert the header of Returns ldns_status ldns_rr2buffer_str() Converts the data in the resource record to presentation format (as char *) and appends it to the given buffer. The presentation format of DNSKEY record is annotated with comments giving the id, type and size of the key. output: pointer to the buffer to append the data to rr: the pointer to the rr field to convert Returns status ldns_rr_list2buffer_str() Converts a rr_list to presentation format and appends it to the output buffer output: the buffer to append output to list: the ldns_rr_list to print Returns ldns_status ldns_rdf2buffer_str() Converts the data in the rdata field to presentation format (as char *) and appends it to the given buffer output: pointer to the buffer to append the data to rdf: the pointer to the rdafa field containing the data Returns status ldns_key2buffer_str() Converts the data in the DNS packet to presentation format (as char *) and appends it to the given buffer output: pointer to the buffer to append the data to k: the pointer to the private key to convert Returns status ldns_pkt2buffer_wire() Copies the packet data to the buffer in wire format *output: buffer to append the result to *pkt: packet to convert Returns ldns_status ldns_rr2buffer_wire() Copies the rr data to the buffer in wire format *output: buffer to append the result to *rr: resource record to convert section: the section in the packet this rr is supposed to be in (to determine whether to add rdata or not) Returns ldns_status ldns_rdf2buffer_wire() Copies the rdata data to the buffer in wire format *output: buffer to append the result to *rdf: rdata to convert Returns ldns_status ldns_rrsig2buffer_wire() Converts a rrsig to wireformat BUT EXCLUDE the rrsig rdata This is needed in DNSSEC verification output: buffer to append the result to sigrr: signature rr to operate on Returns ldns_status ldns_rr_rdata2buffer_wire() Converts an rr's rdata to wireformat, while excluding the ownername and all the stuff before the rdata. This is needed in DNSSEC keytag calculation, the ds calcalution from the key and maybe elsewhere. *output: buffer where to put the result *rr: rr to operate on Returns ldns_status AUTHOR
The ldns team at NLnet Labs. Which consists out of Jelte Jansen and Miek Gieben. REPORTING BUGS
Please report bugs to ldns-team@nlnetlabs.nl or in our bugzilla at http://www.nlnetlabs.nl/bugs/index.html COPYRIGHT
Copyright (c) 2004 - 2006 NLnet Labs. Licensed under the BSD License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. SEE ALSO
ldns_pkt2str, ldns_rr2str, ldns_rdf2str, ldns_rr_list2str, ldns_key2str. And perldoc Net::DNS, RFC1034, RFC1035, RFC4033, RFC4034 and RFC4035. REMARKS
This manpage was automaticly generated from the ldns source code by use of Doxygen and some perl. 30 May 2006 ldns(3)
All times are GMT -4. The time now is 09:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy