Skip to main content

All Questions

Tagged with
2 votes
7 answers
275 views

merge multiple files using full join by the first column

I have a directory with 200 samples. Each file has two columns. I want to full join these files and make a joined file This is the example of $ head 346_T1_A_deduped.bismark.cov_format 1_10525 95.2 ...
Anna1364's user avatar
  • 1,064
-1 votes
1 answer
79 views

Why no one thought of the concept of joins before the 70s? [closed]

So, let me see if I have my history right: In 1976, the first system sold as an RDBMS was Multics Relational Data Store. I don't know if it had JOIN, but let's assume it did. The UNIX command join ...
Sebastian Carlos's user avatar
1 vote
2 answers
675 views

Bash Join command inserting delimiter characters into first element

I have two files: File1.txt: 510806153|1||||33245|65|6236067806|25001|7746250 510806153|1||||33245|65|6968349321|25001|8956584 File2.txt 510806153||||| When I do join -t \| -j 1 file1.txt file2.txt, ...
hiramthehero's user avatar
2 votes
1 answer
1k views

Merge two files using first column

I have two different files and I'd like to do a merge of their information using the first column. File1.txt A,info1,info2 234,info3,info4 CD,info5,info6 File2.txt 234,ccc,bb CD,aaa,dd Expected ...
Tommaso's user avatar
  • 167
0 votes
1 answer
562 views

How to create a new column in tsv files by combining two other columns on linux?

I have 70 directories that have files like below: STAN002 |______ STAN002_sasions.tsv PTAN044 |______ PTAN044_sasions.tsv STAN005 |______ STAN005_sasions.tsv STAN050 |______ ...
beginner's user avatar
  • 277
0 votes
1 answer
413 views

sorting on files and joining

I have two files. I want to sort the file and join on the first column. For example: First file: 100. ttt 200. 616te 300. 7a27 7373qq second file: 100. ttt 200. yoga 300. 7a27 ...
John's user avatar
  • 117
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
212 views

join rows based on string in 2 columns of 2 files

I have a file1 with 3 columns and file2 with 4 columns on a Linux system. How do I join the two files based on the string in column 3 of file1 to the string in column 2 of file2? File2 is a large db ...
Arora's user avatar
  • 79
1 vote
3 answers
317 views

I want to join two files and KEEP all the white space

I am trying to join two data files. The first one has 100.000 records where each line represents one person. The second file has 400.000 records where a person in the first file can appear multiple ...
Þórdís Þórarinsdóttir's user avatar
-1 votes
2 answers
64 views

How to join two files

I want to join two files, and I must use the command join. This is first file file1.txt SUBJID SEX DTHHRDY GTEX-1117F 2 4 GTEX-111CU 1 0 GTEX-111FC 1 1 GTEX-1122O 2 4 This is the second ...
Vane Almache's user avatar
3 votes
2 answers
7k views

Merge multiple files by first column

My question is similar to this one: Merge multiple columns based on the first column values I have multiple files (10+) that I want to merge/join into one output file, for example: file 1 2000 0....
pascal's user avatar
  • 161
0 votes
1 answer
190 views

Merging two files based on a common column; add 0 for variants not present in file 2, and keep the original value in those which are present

I would like to merge two files, which share some common data. File 1 includes more than file 2. I want to merge the files based on their shared column (3) following the order of file 1 and I want to ...
kllrdr's user avatar
  • 71
1 vote
1 answer
72 views

merging two files according to a common column and add 0 to those which are not present in file 2

I would like to merge two files, which share some common data. File 1 includes more than file 2. I want to merge the files based on their shared column following the order of file 1 and I want to add ...
kllrdr's user avatar
  • 71
1 vote
1 answer
205 views

Compare second column of two text files and print first columns of both files if match

I am trying to compare second columns of two text files and print the first columns of both files if match. I have tried the below awk codes but it was no use 1) awk 'NR==FNR {a[$2]=$2; next} {print $...
ash's user avatar
  • 23
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

15 30 50 per page
1
2 3 4 5
9