On Tue, 13 May 2008, Phillip Susi wrote:
Philip Rowlands wrote:
Coreutils manpages tend to be short reference sheets listing the available
options. Further documentation is provided in the "info" command, as should
be mentioned as the end of each manpage.
From the docs:
`-b'
`--binary'
Treat each input file as binary, by reading it in binary mode and
outputting a `*' flag. This is the inverse of `--text'. On
systems like GNU that do not distinguish between binary and text
files, this option merely flags each input file as binary: the MD5
checksum is unaffected. This option is the default on systems
like MS-DOS that distinguish between binary and text files, except
for reading standard input when standard input is a terminal.
`-t'
`--text'
Treat each input file as text, by reading it in text mode and
outputting a ` ' flag. This is the inverse of `--binary'. This
option is the default on systems like GNU that do not distinguish
between binary and text files. On other systems, it is the
default for reading standard input when standard input is a
terminal.
I have to agree with Dave on this then. It is a severe bug that text mode is
the default since this means that you will get different results for the
checksum on MS-DOS/Windows than on a GNU/Linux system.
Please re-read the option descriptions. On MS-DOS, the default is
--binary unless reading from a terminal. You'd practically have to be
typing text directly into sha1sum to provoke this behaviour; pipes and
file redirection wouldn't do it. (This does make me wonder why the
behaviour was provided in the first place, as typing into checksumming
utilities seems unusual and error-prone.)
Cheers,
Phil
_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils