[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#164889: md5sum <FILE produces spurious ` -' in output

Raul Miller writes ("Re: Bug#164889: md5sum <FILE produces spurious ` -' in output"):
> There are essentially two approaches to this class of problem.

I think you're approaching this the wrong way.  To look at it only as
a compatibility problem is to avoid the question of which behaviour is
more useful.

The behaviour that GNU md5sum now produces requires pratting about in
every application that simply wants the md5sum of something - which is
a great many applications nowadays.

There is no compelling reason why GNU md5sum needs to keep the complex
output format for the invocation `md5sum <filename'.

According to Herbert, Jim Meyering <jim@meyering.net> wrote:
> Herbert Xu <herbert@gondor.apana.org.au> wrote:
> > I'm getting complaints from Debian users regarding the output of
> > md5sum < file, which is of the form:
> >
> > d47fe6e8023a49af77e5885275d7242f  -
> >
> > The complainants would prefer to see:
> >
> > d47fe6e8023a49af77e5885275d7242f
> >
> > which is analogous to the behaviour cksum and wc.
> >
> > What is your view on this?
> Consistency with other programs would be nice,
> but md5sum --check must parse that same output, and
> its output should stay consistent with that of other
> (historical) md5sum implementations.

There is no reason why `md5sum <filename' should produce output
suitable for `md5sum -c' (which GNU calls --check); md5sum has
historically never done that.  If it is useful to have a way to
produce something that _can_ be used in that way, then the GNU people
can add an option for it in their version (and maybe, if their version
is superior, we can retire ours).

Note that I am not suggesting any change to any md5sum's output format
for `md5sum filename'.  Indeed, it is the PGP2 md5sum that is the
`historical md5sum implementation' that Jim Meyering is referring to.


Reply to: