bug-coreutils
[Top][All Lists]
Advanced

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

Re: Bug#353911: md5sum --check checks only if _all_ are bad


From: Paul Eggert
Subject: Re: Bug#353911: md5sum --check checks only if _all_ are bad
Date: Wed, 22 Feb 2006 10:11:35 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Dan Jacobson <address@hidden> writes:

> $ md5sum test/*|sed 1s/./Z/|>/dev/null md5sum -c --status -w -; echo $?
> md5sum: standard input: 1: improperly formatted MD5 checksum line
> 0
> $ md5sum test/*|sed 1s/./Z/|>/dev/null md5sum -c -; echo $?
> 0
> $ md5sum test/*|sed  s/./Z/|>/dev/null md5sum -c -; echo $?
> md5sum: standard input: no properly formatted MD5 checksum lines found
> 1 #Oh boy, only if they are all bad can one finally get non-zero!
> $ md5sum test/*|sed 1s/./Z/|>/dev/null md5sum -c --status -; echo $?
> 0
> $ md5sum --version
> md5sum (GNU coreutils) 5.93
>
> If this all is POSIX to blame, then you had better put warnings on the
> info and man pages: "Note: all it takes is one properly formatted line
> (doughnut) to payoff the police force".

I agree that the current behavior is confusing.  I'd prefer it if any
improperly formatted line caused a nonzero exit status.  Is there some
reason things are done the way that they are?

At the very least there should be an option to cause an error if the
input file is improperly formatted.  I think the option should be
enabled by default.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]