See what you can do. If you have trouble, show us the code you tried, and we'll be able to help out with the details.get the list of file names declare a hash for output open the first file while reading each line from the file get the first column of the line for use as a hash key assign the line as the value of hash element using that key for each remaining file open the file while reading each line from the file get the first column of the line for use as a hash key append the line to the current value of the hash element using + that key for each key in the hash print the value of the hash element using that key
(I'm hoping I understood your task correctly -- if I didn't, please clarify.)
UPDATE: Actually, the method can be stated even more simply than what I showed above. In effect, you can leave out the part that handles the first file separately, and just do the "for" loop over all files in the list -- i.e. just treat all files in the list the same way.
In reply to Re: join mutiple files on first column
by graff
in thread join mutiple files on first column
by david_lyon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |