I wrote a script to compare 2 same file but in different dir and filename. The md5 sum of both file is the same but how do i assign the output of md5 sum to a variable like $a and $b? Here's my code
Code:
a=$(md5 /home/abc/sss.sh)
b=$(md5 /home/abc/43/sss.sh)
if [ "$a" = "$b" ]
then
echo " match"
else
echo " no match"
fi
I don't know how to assign the output to a variable.. pls help.