Package: coreutils Version: 5.93-5 Severity: minor File: /usr/bin/md5sum Tags: upstream
The docs indeed say "if no valid line is found, `md5sum' exits with nonzero status." i.e., 99999 bad lines are no big deal, all we need is one good line and we pass the so-called "--check"!!: $ 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". P.S.: `--warn' When verifying checksums, warn about improperly formatted MD5 checksum lines. This option is useful only if all but a few lines in the checked input are valid. Say why. Else it sounds like some bolts fall off sometimes maybe. _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils