I have 6 text files of the format SHA-1<tab>7_hex_chars<newline> and each file has 9,000,000 lines. The 6 files are in the same order, with the SHA-1 being the key column of all the files. I can't slurp it all in, and I'm not wild about 6 open files at once, but that may be unavoidable.
I need to munge these together with the result of having six 7-hex-char strings on each line, the 6 values corresponding to the key SHA-1. I don't care if there is a separator, or what it is. Here's a very simple example:
file_1 123412341234etc 1000001 567856785678etc 5000001 ... file_2 123412341234etc 1000002 567856785678etc 5000002 ... file_3 123412341234etc 1000003 567856785678etc 5000003 ... munged output 1000001 1000002 1000003 ... 5000001 5000002 5000003 ...
I'm brain dead at the moment, if anyone can suggest a solution in perl (5.8 preferred) or a linux/BSD system tool, I'd appreciate it.
In reply to join on 6 huge files by dwhite20899
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |