I have two CSV with following data,
file1.csv:-
path(S1),filename,timestamp(S1),memory(S1)
xx/APS50CC2,APS50CC2,23-09-2019,45
yy/APS50CC3,APS50CC3,18-09-2019,25
file2.csv :-
path(S2),filename,timestamp(S2),memory(S2)
mm/APS03CR1,APS03CR1,23-09-2019,200
zz/APS50CC2,APS50CC2,18-09-2019,55
Expected output
output.csv :-
filename,path(S1),timestamp(S1),memory(S1),path(S2),timestamp(S2),memory(S2)
APS50CC2,xx/APS50CC2,23-09-2019,45,zz/APS50CC2,18-09-2019,55
APS50CC3,yy/APS50CC3,18-09-2019,25,Not found,Not found,Not found
APS03CR1,Not found,Not found,Not found,mm/APS03CR1,23-09-2019,200
I have tried join command and have run,it is working fine for smaller set of input. But when I run for about 500000+ records, it is giving errors, hence I do not want to use join, I want to try it out using awk...
I am kind of new to awk, kindly help me out with the syntax.
The key here for joining is column 2 i.e. filename.
join, as that tool would be the most efficient to use here. Does you CSV files use tabs as field delimiter?join? Because if it doesn't, I really see no issues with usingjoin.