# Matt Kosht: > Is there a simple way to compare the md5 checksum of a file, to a file > that contains possibly more than one md5 checksum entry in it? Kind > of like mdsum -c does?
Perfect job for a shellscript. :) #!/bin/sh if [ -z "$2" ]; then echo "Usage: `basename $0` <file> <file with sums>" 1>&2 exit fi sum=`md5 "$1" | sed 's-^MD5 [^=]*= --'` cnt=`grep -c "$sum" "$2"` if [ $cnt -eq 0 ]; then echo "No match." else echo "Match." fi HTH Mario _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"