SCRIPT TO CHECK THE FILE PERMISSIONS
#!/bash/sh
f1=`ls -l $1 | cut -c 2-10`
f2=`ls -l $2 | cut -c 2-10`
if [ $f1 == $f2 ]
then
echo " both the files have same permissions $f1"
else
echo "file 1 as permission of $f1"
echo "file 2 as permission of $f2"
fi