10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Join and merge multiple files with duplicate key and fill void columns
Hi guys,
I have many files that I want to merge:
file1.csv:
1|abc
1|def
2|ghi
2|jkl
3|mno
3|pqr
file2.csv: (5 Replies)
Discussion started by: yjacknewton
5 Replies
2. Shell Programming and Scripting
Hi guys,
I need AWK to merge the following 2 files:
file1
1 a 1 1
2 b 2 2
3 c 3 3
4 d 4 4
file2
a a/a c/c a/c c/c a/a c/t
c c/t c/c a/t g/g c/c c/t
desired output:
1 a 1 1 a/a c/c a/c c/c a/a c/t
2 b 2 2 x x x x x x
3 c 3 3 c/t c/c a/t g/g c/c c/t
4 d 4 4 x x x x x x (2 Replies)
Discussion started by: g1org1o
2 Replies
3. Shell Programming and Scripting
Hi guys,
I need to use awk to join 2 files
file_1
A 001
B 002
C 003
file_2
A XX1
B XX2
output desired
A 001 XX1
B 002 missing
C 003 XX2
thank you! (2 Replies)
Discussion started by: g1org1o
2 Replies
4. UNIX for Dummies Questions & Answers
file1:
Toronto:12439755:1076359:July 1, 1867:6
Quebec City:7560592:1542056:July 1, 1867:5
Halifax:938134:55284:July 1, 1867:4
Fredericton:751400:72908:July 1, 1867:3
Winnipeg:1170300:647797:July 15, 1870:7
Victoria:4168123:944735:July 20, 1871:10
Charlottetown:137900:5660:July 1, 1873:2... (2 Replies)
Discussion started by: mindfreak
2 Replies
5. Web Development
Hello;
I am posting to get any help on my code that I have been struggling for some time. The project is to join two files each with 80k~180k rows. I want to merge them together by the shared common column. The problem of the shared column is partially matching, not exactly the same.
File1:... (5 Replies)
Discussion started by: yifangt
5 Replies
6. Shell Programming and Scripting
I have a vim outliner file like this:
Title
title 2
:Testing now
:testing 2
:testing 3
title 3
:testing
:ttt
:ttg
Is there a way to use a script or command to remove... (7 Replies)
Discussion started by: jostber
7 Replies
7. Shell Programming and Scripting
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies
8. UNIX for Dummies Questions & Answers
Hello,
My apologies if this has been posted elsewhere, I have had a look at several threads but I am still confused how to use these functions. I have two files, each with 5 columns:
File A: (tab-delimited)
PDB CHAIN Start End Fragment
1avq A 171 176 awyfan
1avq A 172 177 wyfany
1c7k A 2 7... (3 Replies)
Discussion started by: InfoSeeker
3 Replies
9. Programming
example sql:
select a.a1,b.b1,c.c1,d.d1,e.e1
from a
left outer join b on a.x=b.x
left outer join c on b.y=c.y
left outer join d on d.z=a.z
inner join a.t=e.t
I know how single outer or inner join works in sql.
But I don't really understand when there are multiple of them.
can... (0 Replies)
Discussion started by: robbiezr
0 Replies
10. Shell Programming and Scripting
nawk 'NR==FNR{a;next} {if($1 in a) print $1,"Found" else print}' OFS="," File_B File_A
The above code is not working help is appreciated (6 Replies)
Discussion started by: pinnacle
6 Replies