delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/06/19/17:32:20

From: marcus AT bighorn DOT dr DOT lucent DOT com
Subject: Re: md5sum uses text mode, not binary mode
19 Jun 1998 17:32:20 -0700 :
Message-ID: <199806191346.HAA22801.cygnus.gnu-win32@chorus.dr.lucent.com>
To: gnu-win32 AT cygnus DOT com, mcook AT cognex DOT com

> 
> 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).

A better test would be to do:

	cat foo.exe >xxx

and see if xxx and foo.exe look the same.

marcus hall
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019