I have a very huge file (~10Gb data) which contains data in below format -
'1','1' '2','2' '3','3' '4','4' '5','5' '6','6' '7','7' '8','8' '9','9' '10','10' and format of another file (which is 300Kb in size) is -
1,2 1,3 1,4 1,5 1,6 1,7 1,8 1,9 1,10 2,1 2,3 2,4 2,5 2,6 2,7 2,8 2,9 desired output -
'1','1','1,2', '2','2','1,3', '3','3','1,4', '4','4','1,5', '5','5','1,6', '6','6','1,7', '7','7','1,8', '8','8','1,9', '9','9','1,10', '10','10','2,1', since the input file contains more than 10 million records. so doing it via a loop will be a very costly operation.
paste -d",''" 1 - 2 - - </dev/null