This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mount type, compiler barf, and sym links


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@crocodial.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@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]