in reply to combining 2 files with a comon field


The unix utility join will do this (assuming that file1 and file2 are sorted):
$ join -t\| file1 file2 A1|dog||Fido| A2|cat||Fluffy| A3|bird||Tweety|
From which you could filter out the extra empty field or extend the command line options to select specific fields:
$ join -t\| -o 1.1 1.2 2.2 2.3 file1 file2 A1|dog|Fido| A2|cat|Fluffy| A3|bird|Tweety|

--
John.