Pages

Tuesday, March 19, 2013

Write a script to check the given two file are equal or not?


$vi twofiles_same.sh
echo “enter first file “
read f1
echo “enter second file”
read f2
x =`cmp $f1 $f2`
if [-z $x]
then
echo “both are same”
else
echo “both are not same”
fi
:wq

No comments:

Post a Comment