Skip to main content

All Questions

0 votes
3 answers
399 views

join multiple files efficiently

I know there are some posts to join multiple files but it took so much time. I have multiple files in which the first columns are for the patients' IDs, then I want to join multiple files, based on ...
user10345633's user avatar
0 votes
1 answer
1k views

How to selectively join lines starting with a pattern [duplicate]

This post may be looked upon as a followup to a previous post. This is input file: module ABC x(a,b,c) module DEFG y(d,e,f, g,h,i) module HIJKL z(j,k,l) And output file should be: module ...
Sandeep's user avatar
  • 139
0 votes
2 answers
494 views

Merge CSV Files based on ID even when Unmatched IDS and Indefinite Number of Columns

I'm writing a bash script and part of the process requires to piece csv files together whilst preserving the integrity of the columns; for example I have two files in the following format: F1 ID,MD,...
madArch's user avatar
  • 97
0 votes
0 answers
148 views

how to merge two files to skip duplicate data

I have two different large files (each one more than 300,000 lines) and I want to combine them in a specific way. Some rows of the two data measure the same thing; when columns 9, 14, 15, 16, 17 are ...
Esi's user avatar
  • 5
0 votes
1 answer
65 views

Merge two texts with comparison of the rows and select one text's rows if some columns are similar

I have two different files which some rows of the two data measures a same thing. I want to have a merged output such that the rows of File1 will be the output row where the rows measures same thing (...
Esi's user avatar
  • 5
6 votes
4 answers
15k views

Merge two files

I have this file1.txt deiauk 9 kespaul 8 luktol 7 titkur 6 and other file2.txt kespaul b deiauk a And I want to merge both files in one by first value, so my result should be deiauk 9 a kespaul 8 ...
user3334375's user avatar
  • 1,825
1 vote
1 answer
278 views

How to merge two files in the same row?

I have two files. file1: Dave 734.838.9800 Bob 313.123.4567 Carol 248.344.5576 Mary 313.449.1390 Ted 248.496.2204 Alice 616.556.4458 file2: Bob Tuesday Carol Monday Ted Sunday ...
billy klarr's user avatar
3 votes
2 answers
5k views

Merge some tab-delimited files

I have 100 files with 57,816 rows each.I want to do an outer join of these files by merging on basis of the common column. I am using R programming for this but this is very slow. fileList <- ...
Ron's user avatar
  • 1,087
3 votes
3 answers
2k views

Merging Two Files with Difference only

I have two files. file1 contains text as follows: #This Data written by the platform Team id=kingDB file2 contains the text as follows: #This Data written by the platform Team id=kiteDB,mangoDB I ...
Sachin's user avatar
  • 159
3 votes
2 answers
2k views

Merging files by rows

Is it possible to copy the whole rows of File1 in a new File3 following the instruction given by File2 by using a simple bash script using sed or awk? File1: /*two or more columns*/ AC 456324 DC ...
dovah's user avatar
  • 1,757
2 votes
2 answers
258 views

Removing lines with a single common field

I have a tab separated file that looks like this: 123 some text 123 some different text 334 some other text 341 more text and I want to do two things. One is to order everything numerically (...
Stefan's user avatar
  • 23
7 votes
5 answers
2k views

Join two files, matching on a column, with repetitions

How can I get two files A and B, and out put a result like this: File A: 001 Apple, CA 020 Banana, CN 023 Apple, LA 045 Orange, TT 101 Orange, OS 200 Kiwi, AA File B: 01-Dec-2013 01.664 001 ...
JOSS's user avatar
  • 95
3 votes
3 answers
4k views

compare files line by line and create new one bash programming

I have two text files. File 2 has logs over 1,000,000. File 1 has IP addresses line by line. I want to read file 2 lines and search these lines in file 1, I mean: file 1: 34.123.21.32 45.231.43.21 ...
DessCnk's user avatar
  • 33
4 votes
3 answers
6k views

Comparing files line by line in awk with delimiter

file1: abc|123|check def|456|map ijk|789|globe lmn|101112|equator file2: abc|123|check def|456|map ijk|789|equator lmn|101112|globe EXPECTED OUTPUT: ijk|789|equator lmn|101112|globe Current awk ...
user1502952's user avatar
9 votes
5 answers
18k views

Compare two files with first column and remove duplicate row from 2nd file in shell script

I will ask my question with an example. I have 2 files: File #1: 118D FC300_R5_TP FX.B 32775 2112 6 2038 6 2112 0 118E FC300_R5_TP FX.B 32775 2136 7 ...
Rahul Rana's user avatar

15 30 50 per page