delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/10/22/22:43:52

From: benny AT crocodial DOT de (Benjamin Riefenstahl)
Subject: Re: mount type, compiler barf, and sym links
22 Oct 1998 22:43:52 -0700 :
Message-ID: <362F1ECF.4B7A26A5.cygnus.gnu-win32@crocodial.de>
References: <001201bdfcd6$7282af50$124b47c1 AT sorokin DOT intervett DOT no>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi Bjørn,


Bjørn Hell Larsen wrote:
> For instance, in the GNU-Win32 distribution, the tools "cat" and "grep"
> are classified as "text tools",

In practice cat is commonly used to handle binary files. Also cat does
not process files in any way. It's pointless to convert input from
external to internal representation just to output the very same data
with the backwards conversion. Cat should use binary mode.

[grep using text mode]
>         MATCHES=`grep -c pattern binaryfile`
> 
> won't do what I expected it to do.

In which way? As far as I see this example should work the same as under
Unix. Other uses of grep might have different behaviour than on Unix.
But in most cases that I can imagine off the top of my head, I don't
have any trouble arguing that grep should not really be used in those
cases in the first place.

> I would much prefer a single global setting that I could toggle,
> that would make all tools work in complete binary mode, under
> the assumption that I *know* about the MS/Unix file format
> differences, and would prefer to be left to deal with them
> myself.

That is what binary mounts do. At the expense that tools that deal with
and process text files (like bash) suddenly break, when they get fed
native text, even though the tool is written correctly. IOW binary
mounts favour broken tools instead of correct tools.


so long, benny
======================================
Benjamin Riefenstahl (benny AT crocodial DOT de)
Crocodial Communications EntwicklungsGmbH
Ruhrstraße 61, D-22761 Hamburg, Germany
-
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