compare two col from 2 files, and output uniq from file 1

Hi,
I can't find how to achive such thing, please help.
I have try with uniq and comm but those command can't compare columns just whole lines,
I think awk will be the best but awk is magic for me as of now.

file a
a1~a2~a3~a4~a6~a7~a8

file b
b1~b2~b3~b4~b6~b7~b8

output 1:
compare columns 3 from files a and b
print all lines from file a where where column a3 is present in file b as b3
a1~a2~a3~a4~a6~a7~a8

Regards
Peter

awk '{print $3}' file.name > new.file.name
then the same for the second file, but append the result, and then "uniq -d" which will print only the duplicates.

Do you want this?

awk 'NR==FNR{x[$3];next}$3 in x' FS="~" fileB fileA

Use nawk or /usr/xpg4/bin/awk on Solaris.