10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file with two fields in it delimited by a comma. Some of the first fields are duplicates. I am trying to eliminate any duplicate records in the first field, and combine the second fields in the output file.
For example, if the input is:
Jane,group=A
Bob,group=A
Bob,group=D... (3 Replies)
Discussion started by: DJR
3 Replies
2. Shell Programming and Scripting
Hi experts,
I have a csv file which has one field (ID) repeated multiple times with corresponding other field values.
I need to convert this file in a format where for a ID all other values has to be present in single field.
For Eg : Here in below file ID 1 is repeated 3 times with different... (7 Replies)
Discussion started by: bharathbangalor
7 Replies
3. Shell Programming and Scripting
Hi, I am trying to merge information across 2 files. The first file is a "master" file, with all IDS. File 2 contains a subset of IDs of those in File 1.
I would like to match up individuals in File 1 and File 2, and add information in File 2 to that of File 1 if they appear. However, if an... (3 Replies)
Discussion started by: hubleo
3 Replies
4. Shell Programming and Scripting
Hi All,
I am looking for an awk script to do the following
Join the fields together only if the first 4 fields are same.
Can it be done with join function in awk??
a,b,c,d,8,,,
a,b,c,d,,7,,
a,b,c,d,,,9,
a,b,p,e,8,,,
a.b,p,e,,9,,
a,b,p,z,,,,9
a,b,p,z,,8,,
desired output:
... (1 Reply)
Discussion started by: aksijain
1 Replies
5. Shell Programming and Scripting
My input is as below:
1|2|3|a02 test|303
2|2|4|1002 a05 ind|303
4|3|5|ind|30
Output
1|2|3|a02test|303
2|2|4|a05ind|303
4|3|5|ind|30
I used command:
I am getting above output. Is there any simple way using awk to acheive this.
Thanks.
Please use code tags! (6 Replies)
Discussion started by: Jairaj
6 Replies
6. UNIX for Dummies Questions & Answers
Hi, I need help with the join command
I have 2 files that I want to join on multiple fields.
I want to return all records from file 1
I also want empty fields in my joined file if there isn't a match in file 2
I have already sorted them so I know they are in the same order.
file1 ... (0 Replies)
Discussion started by: shunter0810
0 Replies
7. Shell Programming and Scripting
Hi Experts,
I need your timely help. I have a problem with merging two files. Here my situation :
Here I have to compare first three fields from FILE1 with FILE2. If they are equal, I have to append the remaining values from FILE2 with FILE1 to create the output.
FILE1:
Class ... (3 Replies)
Discussion started by: Hunter85
3 Replies
8. Shell Programming and Scripting
INPUT
have a file with 2 columns. evry set in a column ends with a symbol //.
the first one with something like chr, chr no, chromosome name, cell no. cell no. etc and the second column has values belong to the first columnlike chr Xy, 22, 345,22222 etc. Some clumns have repeated but not... (4 Replies)
Discussion started by: bogu0001
4 Replies
9. Shell Programming and Scripting
File 1
3337304 2 4 DH.ER@TORONTO.CA 20080504 04622
3337305 2 4 A@C.COM 20080504 04622
3337306 2 4 JO@NET.NET 20080504 04622
3337307 2 4 L@GMAIL.COM 20080504 05344
2479201 2 2 ORY@YAHOO.COM 20080504 05344
File 2
... (5 Replies)
Discussion started by: rudoraj
5 Replies
10. Shell Programming and Scripting
Is it possible to do a join on multiple fields of two files? I am trying to do something like join -t, -1 2,3 -2 2,3 -o 2.1,2.2,2.3,1.3 filea fileb
I want the join to be on columns 2 and 3 of filea and columns 2 and 3 of fileb.
What is hapenning is that the second file that I want to do the join... (1 Reply)
Discussion started by: reggiej
1 Replies