list of unmatched columns

Hi ,
I have two files want to compare and list of column values and postion which are not matched between two files,I can use diff but it will return rows from two files which are matched and unmatched columns.I wrote the below script but not working.

f1=$1
f2=$2
for i in 1
do
file1=`cat $f1 |awk -v col=$i '{print $col}'`
file2=`cat $f2 |awk -v col=$i '{print $col}'`
if [ "$file1" != "$file2" ] ; then
echo $i ":" $file1 ":" $file2 ":"
else
echo "records are matches"
fi
done

Thanks and Regards,
MR

Buddy....

I couldn't really understand ur prob....Can you please give me an example...
Probably I cud be of some help to you...

Bye...

Hi.

To help explain the problem, post samples of the files, and desired output. Please use code blocks to allow easy reading, like this:

f1=$1
f2=$2
for i in 1
do
...

Best wishes ... cheers, drl

Hi ,
Sorry for not proper explanation .

Example
file1 : 100 xyz cc
file 2: 100 yzc zz

xyz is column position is 2 and cc is 3 in file1
yzc is colimn position is 2 and zz is 3 in file2 as well

When compating ,o/p should be

2:3: xyz :cc
2:3: yzc :zz

Thanks and Regards,
MR