If we're going with that assumption (same number of lines, and the keys are in the same order), then it's a one liner in unix shell:
paste -d\| file1 file2 | cut -d\| -f1,2,5- > file3I think I prefer jmcnamara's solution with join, though, as it's more forgiving of bad input.
In reply to Re^2: combining 2 files with a comon field
by jhourcle
in thread combining 2 files with a comon field
by jjohhn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |