bug-coreutils
[Top][All Lists]
Advanced

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

bug#9531: md5sum: confusing documentation for file type output


From: Jim Meyering
Subject: bug#9531: md5sum: confusing documentation for file type output
Date: Sat, 17 Sep 2011 15:15:01 +0200

Reuben Thomas wrote:
> The documentation says:
>
> The default mode is to print a line with checksum, a character
> indicating type (`*' for binary, `
>  ' for text), and name for each FILE.
>
> There are two problems here. First, a small one: the second character
> is a space character, which needs to be non-breaking, and preferably
> explained, as in "` ' (a space)". If you agree, I'll make a patch for
> the info and man page.

Sure, thanks.  Though the man page renders fine for me,
with an 80-column-wide terminal:

       input  should  be a former output of this program.  The default mode is
       to print a line with checksum, a character  indicating  type  (`*'  for
       binary, ` ' for text), and name for each FILE.

Maybe it depends on terminal width?

However, "... indicating type" refers to "type of checksum line",
or "type to be used for", not the type of the file.  It controls how
md5sum opens the file, but only on systems for which O_BINARY makes
a difference (which means it's not worth much discussion for
unix/linux/gnu-centric documentation).

> Secondly, looking at the code, this isn't really what md5sum does.
> Rather, it prints '*' if in binary mode (--binary, or if O_BINARY is
> non-zero), and ' ' if in text mode (--text, or if O_BINARY is zero),
> but doesn't actually look at the file. It's not obvious to me why it's
> useful to output what mode md5sum is in (rather than doing some
> analysis of the file) but something needs changing here, whether it's
> behavior or documentation.

Documentation improvements are always welcome.





reply via email to

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