Search Results

Search: Posts Made By: yjacknewton
8,985
Posted By yjacknewton
OS: Red Hat Enterprise Linux Server release 6.6...
OS: Red Hat Enterprise Linux Server release 6.6 (Santiago)
Shell : /bin/sh
8,985
Posted By yjacknewton
Join, merge, fill NULL the void columns of multiples files like sql "LEFT JOIN" by using awk
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
...
9,445
Posted By yjacknewton
I tried this code and here is the result: ...
I tried this code and here is the result:
1|abc|123|jojo|NULL|NULL|NULL
1|abc|NULL|bibi|NULL|NULL|NULL
1|def|123|jojo|NULL|NULL|NULL
1|def|NULL|bibi|NULL|NULL|NULL
2|ghi|NULL|NULL|1a2b|1994|US...
9,445
Posted By yjacknewton
The only algo to preserve duplicate data that I...
The only algo to preserve duplicate data that I found is this:
awk 'BEGIN{FS=OFS="|"}NR==FNR{a[$1]=$0;next;}{print $0,a[$1]}' test*;

Does someone have some idea?
But result is not appropiate......
9,445
Posted By yjacknewton
Yes, I forgot to write "NULL"; from this column, ...
Yes, I forgot to write "NULL"; from this column,
I have already seen many post in forum but nothing match with my desire
9,445
Posted By yjacknewton
Join and merge multiple files with duplicate key and fill void columns by using AWK
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


...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 03:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy