[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: |
Sun, 18 Sep 2011 01:07:20 +0200 |
User-agent: |
KMail/1.9.10 |
On Saturday 17 September 2011, Jim Meyering wrote:
> Eric Blake wrote:
> > On 09/17/2011 07:50 AM, Rüdiger Meier wrote:
> >> Maybe you could start to correct it this way:
> >>
> >> 1. add option --textmode ...
> >
> > Rather, --text. But yes, we need this option, so that --binary can
> > be
>
> md5sum already has a --text option.
Oops, how could I miss that.
>
> > default (like it was meant to be). On systems where text and
> > binary
>
> --binary is already the default where it makes a difference,
> unless reading from a terminal.
> > are identical (per POSIX), you want the default to be ' ', not '*'.
> That is already the case.
So reading as text is the default where it doesn't matters?
This leave us with the bad thing that a ' ' md5sum calculated on POSIX
systems makes the Windows user think he should validate the file
using --text which would fail.
Or in other words you can never validate a ' ' md5sum unless you know
about the platform which calculated it.
BTW
Hm, even I've tried on Windows cmd, mingw, cygwin ...
I could not find any case where the calculated md5sum differs when
using --text or --binary. It's always --binary like. Is that
mingw/cygwin magic?
See for example this text file with and without CRLF line feed,
on Posix system:
address@hidden:~/tmp> md5sum < text_lf
3290ec3c19a8a39362f7d70043f15627 -
address@hidden:~/tmp> md5sum < text_crlf
e452464ee760e85acf275f207a520147 -
address@hidden:~/tmp> tr -d '\r' < text_crlf |md5sum
3290ec3c19a8a39362f7d70043f15627 -
mingw binary used in Windows cmd:
C:\MinGW\msys\1.0\bin>md5sum.exe Y:rudi\tmp\text_crlf
\e452464ee760e85acf275f207a520147 *Y:rudi\\tmp\\text_crlf
C:\MinGW\msys\1.0\bin>md5sum.exe --text Y:rudi\tmp\text_crlf
\e452464ee760e85acf275f207a520147 Y:rudi\\tmp\\text_crlf
C:\MinGW\msys\1.0\bin>md5sum.exe --binary Y:rudi\tmp\text_crlf
\e452464ee760e85acf275f207a520147 *Y:rudi\\tmp\\text_crlf
C:\MinGW\msys\1.0\bin>md5sum.exe Y:rudi\tmp\text_lf
\3290ec3c19a8a39362f7d70043f15627 *Y:rudi\\tmp\\text_lf
C:\MinGW\msys\1.0\bin>md5sum.exe --text Y:rudi\tmp\text_lf
\3290ec3c19a8a39362f7d70043f15627 Y:rudi\\tmp\\text_lf
C:\MinGW\msys\1.0\bin>md5sum.exe --binary Y:rudi\tmp\text_lf
\3290ec3c19a8a39362f7d70043f15627 *Y:rudi\\tmp\\text_lf
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, 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, Jim Meyering, 2011/09/17
- bug#9531: md5sum: confusing documentation for file type output,
Rüdiger Meier <=
- 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