delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/11/09/05:34:49

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can't Even Read File Correctly
Date: 9 Nov 2001 10:23:12 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 23
Message-ID: <9sgaqg$cgu$1@nets3.rz.RWTH-Aachen.DE>
References: <MPG DOT 165491792e225e13989690 AT netnews DOT worldnet DOT att DOT net> <9sei6v$8j9$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <MPG DOT 1654a7511c522106989691 AT netnews DOT worldnet DOT att DOT net> <MPG DOT 1654b32b33937e91989692 AT netnews DOT worldnet DOT att DOT net>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1005301392 12830 137.226.32.75 (9 Nov 2001 10:23:12 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 9 Nov 2001 10:23:12 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Robert Neinast <neinast AT worldnet DOT att DOT net> wrote:

> One more question: Is there any way to start up bash so that
> the default is "binary", not "text" mode (yes, I tried looking
> in the documentation).  

No. And for a good reason, too: it's up to the programs being run to
decide what they need their input to be, not Bash.  This *is* still a
DOS platform, after all, where at least some tools still fail
miserably if the supposed text files you feed them don't have \r\n
line ends.

> It really annoys me that programs like ls, wc, and od count those
> \r\n when its only \n that's there (i.e., they give false counts).

They don't count falsely: those bytes *are* in the file, so it's none
of their business assuming they're not.  Not that the number of bytes
in a text file should ever be of importance.  All DJGPP text tools
read text file in text mode, as they should, ironing out the
difference.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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