String Comparison

Is there a way to compare the permission string of two files and output the string if they match?

For ex:

-rw-r--r-- 1 user newuser        0 2009-03-12 16:45 file2
-rw-r--r-- 1 user newuser        0 2009-03-12 16:46 fileone

output:

-rw-r--r--

If they don't match output will be just like

drwxr-xr-x 2 user newuser     4096 2009-02-10 04:18 Templates
-rw-r--r-- 1 user root           6 2009-04-28 00:40 -v

Thank you


if [ $# -ne 2 ]; then
  echo usage: file_one file_two
  exit 1
fi

first=$(  /bin/ls -l $1 | awk '{ print $1; }' )
second=$( /bin/ls -l $2 | awk '{ print $1; }' )

if [[ "$first" = "$second" ]]; then
  /bin/ls -l $1 $2
fi
 ls -l file1.txt file2.txt| awk 'a[$1]++==1{print "same"}'

Awesome, thanks guys ...
How can I cut the permission string to display it by itself if the permissions match?