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

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



Anthony Towns <aj@azure.humbug.org.au> wrote:
> 
> I don't see why GNU textutils upstream hasn't been contacted for their
> opinion. Seeing if they're willing to change textutil's behaviour from
> something that seems to have no particular benefits, would seem like
> the easiest way to avoid gratuitious incompatabilities with other distros.

I contacted him back in July and this is what he had to say:

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.
> 
> It's not hard to remove those three trailing characters.
> E.g. just pipe the output through tr -d ' -' or sed 's/ .*//'
> 
> Hmm... Debian unstable's /usr/bin/md5sum can't handle
> the use of `-' as a name for stdin:
> 
>   $ echo a |md5sum > x
>   $ echo a |/usr/bin/md5sum -c x
>   /usr/bin/md5sum: can't open -
>   Segmentation fault
>   [Exit 139 (SIGSEGV)]
> 
> But the one from textutils can:
> 
>   $ echo a |md5sum.textutils -c x
>   -: OK
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



Reply to: