Date: Sat, 6 Nov 1999 17:57:33 -0500 (EST) From: Brian Fundakowski Feldman <green@freebsd.org> To: obrien@freebsd.org Cc: arch@freebsd.org Subject: Re: new MD5 option Message-ID: <Pine.BSF.4.10.9911061743530.1527-100000@green.myip.org> In-Reply-To: <19991106133558.A5539@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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?
>
> --
> -- David (obrien@NUXI.com)
>
>
--
Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! /
green@FreeBSD.org `------------------------------'
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9911061743530.1527-100000>
