This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: md5sum uses text mode, not binary mode
- To: marcus at bighorn dot dr dot lucent dot com
- Subject: Re: md5sum uses text mode, not binary mode
- From: Michael R Cook <mcook at cognex dot com>
- Date: 19 Jun 1998 10:02:23 -0400
- Cc: gnu-win32 at cygnus dot com
- References: <199806191346.HAA22801@chorus.dr.lucent.com>
marcus@bighorn.dr.lucent.com writes:
> > Finally, `cat' obviously uses text mode:
> >
> > $ cat foo.exe | wc
> > 11 48 2098
> > $ ls -l foo.exe
> > -r-xr-xr-x 1 544 everyone 1190912 Jun 17 16:15 foo.exe
> > $
> >
> > Clearly, `cat' read only the first 2098 bytes. I infer that it saw
> > a ^Z and stopped, implying that `cat' reads its files in text mode.
>
> Here is a flaw in your logic. It could be that wc is setting its input
> into text mode (indeed this is quite likely since wc is meant to process
> text).
Oops, you're right.
> A better test would be to do:
>
> cat foo.exe >xxx
>
> and see if xxx and foo.exe look the same.
`cmp' reports them as being the same.
What got me started looking at md5sum was that I noticed I was
getting different numbers from md5sum when I ran the gnu-win32
version, different from the UNIX (SunOS) version.
Strangely, I get the same signature from both `md5sum --binary' and
`md5sum --text'.
M.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".