atom feed11 messages in org.freebsd.freebsd-archRe: new MD5 option
FromSent OnAttachments
David O'BrienNov 6, 1999 1:35 pm 
Brian Fundakowski FeldmanNov 6, 1999 2:57 pm 
Ollivier RobertNov 6, 1999 5:12 pm 
Bruce EvansNov 6, 1999 7:45 pm 
Wes PetersNov 6, 1999 7:57 pm 
David O'BrienNov 7, 1999 10:31 pm 
Stephen McKayNov 8, 1999 12:12 am 
Satoshi - Ports Wraith - AsamiNov 8, 1999 1:19 am 
Oliver FrommeNov 8, 1999 6:38 pm 
David O'BrienNov 8, 1999 11:19 pm 
John PolstraNov 9, 1999 8:45 am 
Subject:Re: new MD5 option
From:Brian Fundakowski Feldman (gre@freebsd.org)
Date:Nov 6, 1999 2:57:11 pm
List:org.freebsd.freebsd-arch

On Sat, 6 Nov 1999, David O'Brien wrote:

I am adding an option to md5 to reverse the order of output.

From: MD5 (/COPYRIGHT) = 7df8bc77dcee71382ea73eb0ec6a9243

to: MD5 7df8bc77dcee71382ea73eb0ec6a9243 /COPYRIGHT

The reson for this addition is to aid visual diffs. They are much easier if the MD5 hashes are nicely lined up.

I don't understand the issue. If you're going to compare

MD5 (/dev/null) = d41d8cd98f00b204e9800998ecf8427e and MD5 (/dev/null) = 93b885adfe0da089cdf634904fd59f71

They are already lined up. If instead you want to compare something like

MD5 (foo) = d3b07384d113edec49eaa6238ad5ff00 MD5 (quux) = d3b07a382ec010c01889250fce66fb13 to MD5 (foo) = 1bfe5d8702009e431bad3862b79f5d95 MD5 (quux) = 8687c409c3cc95464d49a7c4dff71e73

They're less lined up, but they look a lot better to a human than

MD5 1bfe5d8702009e431bad3862b79f5d95 foo MD5 8687c409c3cc95464d49a7c4dff71e73 quux

If for some reason we _really_ need this, what's wrong with a shell transformation instead:

transform_md5 () { local line while read line; do printf "MD5\t%s\t%s\n" $(echo "$line" | cut -d' ' -f4) \ done }

{"/home/green"}$ md5 /dev/null | transform_md5 MD5 d41d8cd98f00b204e9800998ecf8427e /dev/null

What good is all the convenience we have available to reduce bloat if we never use it for anything?

My question is what flag to use. "-r" for reversed output? "-v" for visual diff?

To Unsubscribe: send mail to majo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message