echo "Enter file name"
read f1 f2
if [ -e $f1 -a -e $f2 ]
then
var1=`ls -l $f1 | cut -c 2-10`
var2=`ls -l $f2 | cut -c 2-10`
if [ $var1 = $var2 ]
then
echo "common permision"
else
echo "not common"
echo "$f1 : $var1"
echo "$f2 : $var2"
fi
else
echo "pleas enter some valid file names"
fi
read f1 f2
if [ -e $f1 -a -e $f2 ]
then
var1=`ls -l $f1 | cut -c 2-10`
var2=`ls -l $f2 | cut -c 2-10`
if [ $var1 = $var2 ]
then
echo "common permision"
else
echo "not common"
echo "$f1 : $var1"
echo "$f2 : $var2"
fi
else
echo "pleas enter some valid file names"
fi
No comments:
Post a Comment