10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
This post is already here but want to do this with another way
Merge multiples files with multiples duplicates keys by filling "NULL" the void columns for anothers joinning files
file1.csv:
1|abc
1|def
2|ghi
2|jkl
3|mno
3|pqr
file2.csv:
1|123|jojo
1|NULL|bibi... (2 Replies)
Discussion started by: yjacknewton
2 Replies
2. UNIX for Dummies Questions & Answers
hi guys,
i need help
I need to join file2 to file1 when column 3 in my file1 and column 1 in my file2 in the same string
file1
AA|RR|ESKIM
RE|DD|RED
WE|WW|SUPSS
file2
ESKIM|ES
SUPSS|SS
Output
AA|RR|ESKIM|ES
RE|DD|RED|
WE|WW|SUPSS|SS (3 Replies)
Discussion started by: radius
3 Replies
3. Shell Programming and Scripting
I've the following data set. I would like to look at the column 3 and only use the rows which has the max value for column 3
Can we use the awk or sed to achieve it.
10 2 10 100
11 2 20 100
12 2 30 100
13 2 30 100
14 ... (7 Replies)
Discussion started by: rudoraj
7 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have 20 tab delimited text files that have a common column (column 1). The files are named GSM1.txt through GSM20.txt. Each file has 3 columns (2 other columns in addition to the first common column).
I want to write a script to join the files by the first common column so that in the... (5 Replies)
Discussion started by: evelibertine
5 Replies
5. Shell Programming and Scripting
Hi,
I need an awk script (or whatever shell-construct) that would take data like below and get the max value of 3 column, when grouping by the 1st column.
clientname,day-of-month,max-users
-----------------------------------
client1,20120610,5
client2,20120610,2
client3,20120610,7... (3 Replies)
Discussion started by: ckmehta
3 Replies
6. Shell Programming and Scripting
Hello,
BC106081_abc_128240811_128241377 7.96301
BC106081_abc_128240811_128241377 39.322
BC106081_cde_128240811_128241377 1.98628
BC106081_def_128240811_128241377 -2.44492
BC106081_abc_128240811_128241377 69.5504
FLJ00075_xyz_14406_16765 -0.173417
... (3 Replies)
Discussion started by: Diya123
3 Replies
7. Shell Programming and Scripting
Hello all,
this should really be easy for you... I need AWK to print column maxima for each column of such input:
Input:
1 2 3 1
2 1 1 3
2 1 1 2
Output should be:
2 2 3 3
This does the sum, but i need max instead:
{ for(i=1; i<=NF; i++)
sum +=$i }
END {for(i=1; i in sum;... (3 Replies)
Discussion started by: irrevocabile
3 Replies
8. Shell Programming and Scripting
Hi all,
I searched through the forum but i can't manage to find a solution. I need to join a set of files placed in a directory (~1600) by column, and obtain an output with first and second column common to each file, but following columns are taken from the file in the list (precisely the fourth... (10 Replies)
Discussion started by: macsx82
10 Replies
9. Shell Programming and Scripting
I am trying to retrieve that max 'year' in a text file that is delimited by tilde (~). It is the second column and the values may be in Char format (double quoted) and have duplicate values.
Please help. (4 Replies)
Discussion started by: CKT_newbie88
4 Replies
10. 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