Column update
I have two files:
fileA
a,b,c,10,apple
a,b,c,20,orange
a,b,c,10,grape
d,e,f,5,pear
d,e,f,100,pear
x,y,z,15,lemon
x,y,z,20,apple
x,y,z,30,grape
fileB
a,b,c,20
d,e,f,100
x,y,z,30
If col1=col1,col2=col2 and col3=3 of fileA to fileB, then take value in 4th col of fileB and replace it in fileA...so I get this:
desired output:
a,b,c,20,apple
a,b,c,20,orange
a,b,c,20,grape
d,e,f,100,pear
x,y,z,30,lemon
x,y,z,30,apple
x,y,z,30,grape
is while within while my only option or does someone know an awk solution that can do this faster, especially if the files will be very large?
Thanks.
G