Search Results

Search: Posts Made By: bkane3
1,364
Posted By Don Cragun
Change: awk -F, 'NR==FNR {a[$1,$2]=$0; next}...
Change:
awk -F, 'NR==FNR {a[$1,$2]=$0; next} ($12,$4) in a {print $12,$1,a[$1,$2]}' OFS="," file4.csv file3.csv
to:
awk -F, 'NR==FNR {a[$1,$2]=$0; next} ($12,$4) in a {print $12,$1,a[$12,$4]}'...
8,224
Posted By Akshay Hegde
Okay this will be faster, try I wasn't knowing...
Okay this will be faster, try I wasn't knowing about your file size

$ awk -F, 'FNR==NR{A[$1 FS $2 FS $6 FS $4] = $3 OFS $5;next}(($12 FS $4 FS $6 FS $5) in A){print $0,A[$12 FS $4 FS $6 FS $5]}'...
8,224
Posted By Akshay Hegde
There is no match except header in current...
There is no match except header in current example try this

awk -F, '
FNR==NR{
# Read file3

# Loop through fields...
for(i=1;i<=NF;i++)
{
if(i < 4 || ( i > 6 && i < 12 )...
8,224
Posted By Akshay Hegde
Welcome to forums. $ cat file1 ...
Welcome to forums.
$ cat file1
id,chain,offer,market,repeattrips,repeater,offerdate
86246,205,1208251,34,5,t,2013-04-24
86252,205,1197502,34,16,t,2013-03-27
12682470,18,1197502,11,0,f,2013-03-28...
Showing results 1 to 4 of 4

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