Hello Friends,
I just need a small help, I need an awk program which can join 2 fields of different files which are having one common field into one file.
File - 1
FileName~Size
File- 2
FileName~Date
I need the output file in the following way
O/P- File
FileName~Date~Size
For this req, do the files have to be sorted?,
The files are as huge as 10 million lines.
Need your help,
Hi,
Thanks a lot for the reply. Am aware of the join command, but for that the file has to be sorted. So if I sort a 10 million file its breaking in between saying that there is not much space left.
but I make no guarantee that awk won't run out of memory for files this large.
If a line in the second file doesn't have a match in the first file, a record will be printed with the 3rd field empty. It would also be possible to add a couple of statements to print any lines that appear in the 1st input file that don't contain a matching line in the 2nd input file, but I didn't bother since you have implied that there are always matching lines in the two input files.