[csw-users] Use the Solaris 10 digest utility to check md5 checksums

Armand Heijster - Sun EMEA - CES Armand.Heijster at Sun.COM
Mon Mar 28 10:23:59 CEST 2005


#
# Check if we have md5. Use it later, if we do, via $MD5
#
md5wrap(){
         md5 $1 | awk '{print $4}'
}
gmd5sumwrap(){
         gmd5sum $1 | awk '{print $1}'
}
s10md5wrap(){
         /usr/bin/digest -a md5 $1
}

MD5=""
if whence md5 >/dev/null ; then
         MD5=md5wrap
elif whence gmd5sum >/dev/null ; then
         MD5=gmd5sumwrap
elif [ -x /usr/bin/digest ]; then
         MD5=s10md5wrap
fi


Thanks to Menno for the script
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Armand.Heijster.vcf
Type: text/x-vcard
Size: 305 bytes
Desc: not available
URL: <http://lists.opencsw.org/pipermail/users/attachments/20050328/82b235f3/attachment-0001.vcf>


More information about the users mailing list