[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9531: md5sum: confusing documentation for file type output
From: |
Rüdiger Meier |
Subject: |
bug#9531: md5sum: confusing documentation for file type output |
Date: |
Sat, 17 Sep 2011 15:50:03 +0200 |
User-agent: |
KMail/1.9.10 |
On Saturday 17 September 2011, Eric Blake wrote:
> I hate the way md5sum currently works. What we _should_ have done is
> make binary normal, and do a new symbol for O_TEXT being non-zero.
> That way, the only platforms where it matters (such as cygwin) would
> default to binary, and make it explicit when carriage returns were
> not being considered due to text mode differing from binary mode.
>
> Also, presence of a literal carriage return in a file name must be
> escaped as \r (just as we escape \n and \\ for newlines and
> unambiguous escapes), so that md5sum output on a platform with text
> files does not cause ambiguities when literal carriage returns are
> eaten or added.
>
> I've had ideas of how to change things for several years now, but
> never enough of an itch to actually code it up. The biggest problem
> is the fact that it would be an incompatible format to what existing
> md5sum parses, so you'd have to phase it out with options on whether
> to generate new or old style.
Yes, it's a real dilemma.
Maybe you could start to correct it this way:
1. add option --textmode ...
2. On systems where it matters print a warning if neither --textmode
nor --binary is specified, like:
"warning, we are reading in textmode per default, is this what you
want ...? Your script is not portable now and default behavior will
be changed some day."
Probably better skip point 1. to not create even more backward
compatibility issues in the future. Also I guess there is no use case
for the current --textmode default behaviour at all. So people who are
using textmode now by default/mistake should be forced to switch
to --binary.
Never mind, personally I don't care about the poor O_TEXT people. More
important it's to not confuse Unix beginners:
-b, --binary
read in binary mode on "whatever systems it matters".
cu,
Rudi
- bug#9531: md5sum: confusing documentation for file type output, Reuben Thomas, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output, Rüdiger Meier, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output, Eric Blake, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output,
Rüdiger Meier <=
- bug#9531: md5sum: confusing documentation for file type output, Rüdiger Meier, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output, Eric Blake, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output, Jim Meyering, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output, Rüdiger Meier, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output, Alan Curry, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output, Rüdiger Meier, 2011/09/17
bug#9531: md5sum: confusing documentation for file type output, Jim Meyering, 2011/09/17