Compare 2 fields in 2 files

view story

http://www.unix.com – I am trying to compare two files (separted by a pipe) using 2 fields (field 1,3 from fileA and 1,2 from fileB) if the two files match i want the whole record of fileA adding the extra fields left from fileB. 1. A.txt Code: cat|floffy|12|anything|anythings cat|kitty|15|lala|lalala dog|bob|2|field4|field5 dog|izzy|14|something|somethings 2. B.txt Code: cat|1|locations 0|san jose cat|12|locations 2,3|san jose cat|15|locations 0,1,2,3|tampa dog|1|locations 0|nevada dog|2|locations 1|nevada dog|8|locations 3|connecticut dog|14|locations 1,2,3|connecticut dog|15|locations 0,1,2,3|connecti (HowTos)