md5(1) and cal(1)

Eitan Adler lists at eitanadler.com
Tue May 11 19:27:44 UTC 2010


> D> 2. Why doesn't md5(1) have a "check" option?  Seems to me requiring a
> D> manual inspection is error-prone at best, and makes scripting
> D> unecessarily complicated.
>

Would something like the attached patch be good?
It adds a -c option for a string to check against. It prints "[failed]" if
the string does not match the files md5 unless in -q mode.
It also returns 2 to indicate md5 match failure for use in scripts.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: md5-check.patch
Type: application/octet-stream
Size: 2739 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100511/71214caf/md5-check.obj


More information about the freebsd-questions mailing list