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